Class RoleSyntax
java.lang.Object
org.gudy.bouncycastle.asn1.ASN1Encodable
org.gudy.bouncycastle.asn1.x509.RoleSyntax
- All Implemented Interfaces:
DEREncodable
Implementation of the RoleSyntax object as specified by the RFC3281.
RoleSyntax ::= SEQUENCE {
roleAuthority [0] GeneralNames OPTIONAL,
roleName [1] GeneralName
}
-
Field Summary
FieldsFields inherited from class ASN1Encodable
BER, DER -
Constructor Summary
ConstructorsConstructorDescriptionRoleSyntax(String roleName) Utility constructor.RoleSyntax(ASN1Sequence seq) Constructor that builds an instance ofRoleSyntaxby extracting the encoded elements from theASN1Sequenceobject supplied.RoleSyntax(GeneralName roleName) Constructor.RoleSyntax(GeneralNames roleAuthority, GeneralName roleName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleSyntaxgetInstance(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.Stringobject.Implementation of the methodtoASN1Objectas required by the superclassASN1Encodable.toString()Methods inherited from class ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
Field Details
-
roleAuthority
-
roleName
-
-
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 aStringargument representing the role name, builds aGeneralNameto hold the role name and calls the constructor that takes aGeneralName.- Parameters:
roleName-
-
RoleSyntax
Constructor that builds an instance ofRoleSyntaxby extracting the encoded elements from theASN1Sequenceobject supplied.- Parameters:
seq- an instance ofASN1Sequencethat holds the encoded elements used to build thisRoleSyntax.
-
-
Method Details
-
getInstance
RoleSyntax factory method.- Parameters:
obj- the object used to construct an instance ofRoleSyntax. It must be an instance ofRoleSyntaxorASN1Sequence.- Returns:
- the instance of
RoleSyntaxbuilt from the supplied object. - Throws:
IllegalArgumentException- if the object passed to the factory is not an instance ofRoleSyntaxorASN1Sequence.
-
getRoleAuthority
Gets the role authority of this RoleSyntax.- Returns:
- an instance of
GeneralNamesholding the role authority of this RoleSyntax.
-
getRoleName
Gets the role name of this RoleSyntax.- Returns:
- an instance of
GeneralNameholding the role name of this RoleSyntax.
-
getRoleNameAsString
Gets the role name as ajava.lang.Stringobject.- Returns:
- the role name of this RoleSyntax represented as a
java.lang.Stringobject.
-
getRoleAuthorityAsString
Gets the role authority as aString[]object.- Returns:
- the role authority of this RoleSyntax represented as a
String[]array.
-
toASN1Object
Implementation of the methodtoASN1Objectas required by the superclassASN1Encodable.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }- Specified by:
toASN1Objectin classASN1Encodable
-
toString
-