Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class RoleSyntax

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1Object, .ASN1Primitive, .ASN1Sequence, .ASN1String, .ASN1TaggedObject, .DERSequence, .DERTaggedObject

Implementation of the RoleSyntax object as specified by the RFC3281.
RoleSyntax ::= SEQUENCE {
                roleAuthority  [0] GeneralNames OPTIONAL,
                roleName       [1] GeneralName
          } 

Field Summary

Modifier and TypeField and Description
private GeneralNames
private GeneralName

Constructor Summary

AccessConstructor and Description
public
RoleSyntax(GeneralNames
the role authority of this RoleSyntax.
roleAuthority
,
GeneralName
the role name of this RoleSyntax.
roleName
)

Constructor.

public
RoleSyntax(GeneralName
the role name of this RoleSyntax.
roleName
)

Constructor.

public
RoleSyntax(String roleName)

Utility constructor.

private
RoleSyntax(ASN1Sequence
an instance of ASN1Sequence that holds the encoded elements used to build this RoleSyntax.
seq
)

Constructor that builds an instance of RoleSyntax by extracting the encoded elements from the ASN1Sequence object supplied.

Method Summary

Modifier and TypeMethod and Description
public static RoleSyntax

Returns:

the instance of RoleSyntax built from the supplied object.
getInstance
(Object
the object used to construct an instance of RoleSyntax. It must be an instance of RoleSyntax or ASN1Sequence.
obj
)

RoleSyntax factory method.

public GeneralNames

Returns:

an instance of GeneralNames holding the role authority of this RoleSyntax.
getRoleAuthority
()

Gets the role authority of this RoleSyntax.

public String[]

Returns:

the role authority of this RoleSyntax represented as a String[] array.
getRoleAuthorityAsString
()

Gets the role authority as a String[] object.

public GeneralName

Returns:

an instance of GeneralName holding the role name of this RoleSyntax.
getRoleName
()

Gets the role name of this RoleSyntax.

public String

Returns:

the role name of this RoleSyntax represented as a java.lang.String object.
getRoleNameAsString
()

Gets the role name as a java.lang.String object.

public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Implementation of the method toASN1Object as required by the superclass ASN1Encodable.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

roleAuthorityback to summary
private GeneralNames roleAuthority
roleNameback to summary
private GeneralName roleName

Constructor Detail

RoleSyntaxback to summary
public RoleSyntax(GeneralNames roleAuthority, GeneralName roleName)

Constructor.

Parameters
roleAuthority:GeneralNames

the role authority of this RoleSyntax.

roleName:GeneralName

the role name of this RoleSyntax.

RoleSyntaxback to summary
public RoleSyntax(GeneralName roleName)

Constructor. Invoking this constructor is the same as invoking new RoleSyntax(null, roleName).

Parameters
roleName:GeneralName

the role name of this RoleSyntax.

RoleSyntaxback to summary
public RoleSyntax(String roleName)

Utility constructor. Takes a String argument representing the role name, builds a GeneralName to hold the role name and calls the constructor that takes a GeneralName.

RoleSyntaxback to summary
private RoleSyntax(ASN1Sequence seq)

Constructor that builds an instance of RoleSyntax by extracting the encoded elements from the ASN1Sequence object supplied.

Parameters
seq:ASN1Sequence

an instance of ASN1Sequence that holds the encoded elements used to build this RoleSyntax.

Method Detail

getInstanceback to summary
public static RoleSyntax getInstance(Object obj)

RoleSyntax factory method.

Parameters
obj:Object

the object used to construct an instance of RoleSyntax. It must be an instance of RoleSyntax or ASN1Sequence.

Returns:RoleSyntax

the instance of RoleSyntax built from the supplied object.

Exceptions
IllegalArgumentException:
if the object passed to the factory is not an instance of RoleSyntax or ASN1Sequence.
getRoleAuthorityback to summary
public GeneralNames getRoleAuthority()

Gets the role authority of this RoleSyntax.

Returns:GeneralNames

an instance of GeneralNames holding the role authority of this RoleSyntax.

getRoleAuthorityAsStringback to summary
public String[] getRoleAuthorityAsString()

Gets the role authority as a String[] object.

Returns:String[]

the role authority of this RoleSyntax represented as a String[] array.

getRoleNameback to summary
public GeneralName getRoleName()

Gets the role name of this RoleSyntax.

Returns:GeneralName

an instance of GeneralName holding the role name of this RoleSyntax.

getRoleNameAsStringback to summary
public String getRoleNameAsString()

Gets the role name as a java.lang.String object.

Returns:String

the role name of this RoleSyntax represented as a java.lang.String object.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Implementation of the method toASN1Object as required by the superclass ASN1Encodable.

RoleSyntax ::= SEQUENCE {
                roleAuthority  [0] GeneralNames OPTIONAL,
                roleName       [1] GeneralName
          } 
Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.