Package org.bouncycastle.asn1.x509
Class RoleSyntax
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.RoleSyntax
- All Implemented Interfaces:
ASN1Encodable
,Encodable
Implementation of the RoleSyntax object as specified by the RFC3281.
RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }
-
Constructor Summary
ConstructorsConstructorDescriptionRoleSyntax
(String roleName) Utility constructor.RoleSyntax
(GeneralName roleName) Constructor.RoleSyntax
(GeneralNames roleAuthority, GeneralName roleName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleSyntax
getInstance
(Object obj) RoleSyntax factory method.Gets the role authority of this RoleSyntax.String[]
Gets the role authority as aString[]
object.Gets the role name of this RoleSyntax.Gets the role name as ajava.lang.String
object.Implementation of the methodtoASN1Object
as required by the superclassASN1Encodable
.toString()
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
RoleSyntax
Constructor.- Parameters:
roleAuthority
- the role authority of this RoleSyntax.roleName
- the role name of this RoleSyntax.
-
RoleSyntax
Constructor. Invoking this constructor is the same as invokingnew RoleSyntax(null, roleName)
.- Parameters:
roleName
- the role name of this RoleSyntax.
-
RoleSyntax
Utility constructor. Takes aString
argument representing the role name, builds aGeneralName
to hold the role name and calls the constructor that takes aGeneralName
.- Parameters:
roleName
-
-
-
Method Details
-
getInstance
RoleSyntax factory method.- Parameters:
obj
- the object used to construct an instance ofRoleSyntax
. It must be an instance ofRoleSyntax
orASN1Sequence
.- Returns:
- the instance of
RoleSyntax
built from the supplied object. - Throws:
IllegalArgumentException
- if the object passed to the factory is not an instance ofRoleSyntax
orASN1Sequence
.
-
getRoleAuthority
Gets the role authority of this RoleSyntax.- Returns:
- an instance of
GeneralNames
holding the role authority of this RoleSyntax.
-
getRoleName
Gets the role name of this RoleSyntax.- Returns:
- an instance of
GeneralName
holding the role name of this RoleSyntax.
-
getRoleNameAsString
Gets the role name as ajava.lang.String
object.- Returns:
- the role name of this RoleSyntax represented as a
java.lang.String
object.
-
getRoleAuthorityAsString
Gets the role authority as aString[]
object.- Returns:
- the role authority of this RoleSyntax represented as a
String[]
array.
-
toASN1Primitive
Implementation of the methodtoASN1Object
as required by the superclassASN1Encodable
.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }
- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-
toString
-