Package org.bouncycastle.asn1.x509
Class RoleSyntax
- java.lang.Object
 - 
- org.bouncycastle.asn1.ASN1Object
 - 
- org.bouncycastle.asn1.x509.RoleSyntax
 
 
 
- 
- All Implemented Interfaces:
 ASN1Encodable,Encodable
public class RoleSyntax extends ASN1Object
Implementation of the RoleSyntax object as specified by the RFC3281.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName } 
- 
- 
Constructor Summary
Constructors Constructor Description RoleSyntax(java.lang.String roleName)Utility constructor.RoleSyntax(GeneralName roleName)Constructor.RoleSyntax(GeneralNames roleAuthority, GeneralName roleName)Constructor. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoleSyntaxgetInstance(java.lang.Object obj)RoleSyntax factory method.GeneralNamesgetRoleAuthority()Gets the role authority of this RoleSyntax.java.lang.String[]getRoleAuthorityAsString()Gets the role authority as aString[]object.GeneralNamegetRoleName()Gets the role name of this RoleSyntax.java.lang.StringgetRoleNameAsString()Gets the role name as ajava.lang.Stringobject.ASN1PrimitivetoASN1Primitive()Implementation of the methodtoASN1Objectas required by the superclassASN1Encodable.java.lang.StringtoString()- 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
RoleSyntax
public RoleSyntax(GeneralNames roleAuthority, GeneralName roleName)
Constructor.- Parameters:
 roleAuthority- the role authority of this RoleSyntax.roleName- the role name of this RoleSyntax.
 
- 
RoleSyntax
public RoleSyntax(GeneralName roleName)
Constructor. Invoking this constructor is the same as invokingnew RoleSyntax(null, roleName).- Parameters:
 roleName- the role name of this RoleSyntax.
 
- 
RoleSyntax
public RoleSyntax(java.lang.String roleName)
Utility constructor. Takes aStringargument representing the role name, builds aGeneralNameto hold the role name and calls the constructor that takes aGeneralName.- Parameters:
 roleName-
 
 - 
 
- 
Method Detail
- 
getInstance
public static RoleSyntax getInstance(java.lang.Object obj)
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:
 java.lang.IllegalArgumentException- if the object passed to the factory is not an instance ofRoleSyntaxorASN1Sequence.
 
- 
getRoleAuthority
public GeneralNames getRoleAuthority()
Gets the role authority of this RoleSyntax.- Returns:
 - an instance of 
GeneralNamesholding the role authority of this RoleSyntax. 
 
- 
getRoleName
public GeneralName getRoleName()
Gets the role name of this RoleSyntax.- Returns:
 - an instance of 
GeneralNameholding the role name of this RoleSyntax. 
 
- 
getRoleNameAsString
public java.lang.String getRoleNameAsString()
Gets the role name as ajava.lang.Stringobject.- Returns:
 - the role name of this RoleSyntax represented as a 
 
java.lang.Stringobject. 
 
- 
getRoleAuthorityAsString
public java.lang.String[] getRoleAuthorityAsString()
Gets the role authority as aString[]object.- Returns:
 - the role authority of this RoleSyntax represented as a
 
String[]array. 
 
- 
toASN1Primitive
public ASN1Primitive toASN1Primitive()
Implementation of the methodtoASN1Objectas required by the superclassASN1Encodable.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }- Specified by:
 toASN1Primitivein interfaceASN1Encodable- Specified by:
 toASN1Primitivein classASN1Object- Returns:
 - a primitive representation of this object.
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -