Package org.gudy.bouncycastle.asn1.x509
Class RoleSyntax
- java.lang.Object
-
- org.gudy.bouncycastle.asn1.ASN1Encodable
-
- org.gudy.bouncycastle.asn1.x509.RoleSyntax
-
- All Implemented Interfaces:
DEREncodable
public class RoleSyntax extends ASN1Encodable
Implementation of the RoleSyntax object as specified by the RFC3281.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }
-
-
Field Summary
Fields Modifier and Type Field Description private GeneralNames
roleAuthority
private GeneralName
roleName
-
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
-
Constructor Summary
Constructors Constructor Description RoleSyntax(java.lang.String roleName)
Utility constructor.RoleSyntax(ASN1Sequence seq)
Constructor that builds an instance ofRoleSyntax
by extracting the encoded elements from theASN1Sequence
object supplied.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 RoleSyntax
getInstance(java.lang.Object obj)
RoleSyntax factory method.GeneralNames
getRoleAuthority()
Gets the role authority of this RoleSyntax.java.lang.String[]
getRoleAuthorityAsString()
Gets the role authority as aString[]
object.GeneralName
getRoleName()
Gets the role name of this RoleSyntax.java.lang.String
getRoleNameAsString()
Gets the role name as ajava.lang.String
object.DERObject
toASN1Object()
Implementation of the methodtoASN1Object
as required by the superclassASN1Encodable
.java.lang.String
toString()
-
Methods inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
-
-
-
Field Detail
-
roleAuthority
private GeneralNames roleAuthority
-
roleName
private GeneralName roleName
-
-
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 aString
argument representing the role name, builds aGeneralName
to hold the role name and calls the constructor that takes aGeneralName
.- Parameters:
roleName
-
-
RoleSyntax
public RoleSyntax(ASN1Sequence seq)
Constructor that builds an instance ofRoleSyntax
by extracting the encoded elements from theASN1Sequence
object supplied.- Parameters:
seq
- an instance ofASN1Sequence
that holds the encoded elements used to build thisRoleSyntax
.
-
-
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 ofRoleSyntax
orASN1Sequence
.- Returns:
- the instance of
RoleSyntax
built from the supplied object. - Throws:
java.lang.IllegalArgumentException
- if the object passed to the factory is not an instance ofRoleSyntax
orASN1Sequence
.
-
getRoleAuthority
public GeneralNames getRoleAuthority()
Gets the role authority of this RoleSyntax.- Returns:
- an instance of
GeneralNames
holding the role authority of this RoleSyntax.
-
getRoleName
public GeneralName getRoleName()
Gets the role name of this RoleSyntax.- Returns:
- an instance of
GeneralName
holding the role name of this RoleSyntax.
-
getRoleNameAsString
public java.lang.String 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
public java.lang.String[] getRoleAuthorityAsString()
Gets the role authority as aString[]
object.- Returns:
- the role authority of this RoleSyntax represented as a
String[]
array.
-
toASN1Object
public DERObject toASN1Object()
Implementation of the methodtoASN1Object
as required by the superclassASN1Encodable
.RoleSyntax ::= SEQUENCE { roleAuthority [0] GeneralNames OPTIONAL, roleName [1] GeneralName }
- Specified by:
toASN1Object
in classASN1Encodable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-