|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cryptix.asn1.lang.SimpleNode
| Field Summary | |
protected ASNObject[] |
children
|
protected java.lang.Object |
defaultValue
The Java object representing the default value for this ASN.1 object if such value is defined in the specification. |
protected int |
id
|
protected java.lang.String |
name
Name associated with this ASN.1 object. |
protected boolean |
optional
True if the ASN.1 object is optional, false otherwise. |
protected ASNObject |
parent
|
protected Parser |
parser
|
protected Tag |
tag
Tag associated with this ASN.1 object. |
protected java.lang.Object |
value
Java object representing the current value of this ASN.1 object when applicable. |
| Constructor Summary | |
SimpleNode(int i)
|
|
SimpleNode(Parser p,
int i)
|
|
| Method Summary | |
java.lang.Object |
accept(ParserVisitor visitor,
java.lang.Object data)
Accepts a visitor. |
java.lang.Object |
childrenAccept(ParserVisitor visitor,
java.lang.Object data)
Accepts the visitor. |
void |
dump()
Dumps this object's specification to System.out. |
void |
dump(java.lang.String prefix)
Dumps this object's specification to System.out prefixing each line with the given string. |
ASNObject |
getChild(int i)
|
ASNObject[] |
getChildren()
|
ASNObject |
getComponent(java.lang.String aName)
Returns a child component of an ASN.1 construct given its full name. |
java.lang.Object |
getDefaultValue()
Similar to getValue() but operates on the default value of this ASN.1 object if such a value is/was defined in the specifications. |
int |
getID()
|
static SimpleNode |
getInstance(Parser p,
Tag tag)
Returns a new instance given a UNIVERSAL ASN.1 tag instance; null otherwise. |
java.lang.String |
getName()
|
ASNObject |
getParent()
|
Parser |
getParser()
|
Tag |
getTag()
Returns a reference to an instance of this ASN.1 object's Tag. |
java.lang.Object |
getValue()
Returns the Java Object containing the current value of this ASN.1 object. |
boolean |
isOptional()
Returns true if this ASN.1 object is optional, false otherwise. |
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data)
Accepts the visitor. |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
void |
setDefaultValue(java.lang.Object defaultValue)
Similar to setValue() but operates on the default value of this ASN.1 object if such a value is/was defined in the specifications. |
void |
setName(java.lang.String name)
Sets the name of this instance. |
void |
setOptional(boolean flag)
Sets the optional flag for this ASN.1 object to the designated value. param flag The new value of the optional flag. |
void |
setTag(Tag tag)
Sets the tag of this ASN.1 object to be the designated Tag. |
void |
setValue(java.lang.Object value)
Sets the value of this component to a native Java instance. The mapping between ASN.1 types and Java types is given below: BOOLEAN: java.lang.Boolean; INTEGER: java.math.BigInteger; BIT STRING: byte[]; OCTET STRING: byte[]; NULL: null; OID: A java.lang.String containing numeric digits and the character '.'; SEQUENCE, SEQUENCE OF, SET and SET OF: cryptix.asn1.lang.ASNObject[]; PrintableString: java.lang.String. |
java.lang.String |
toString()
You can override these two methods in subclasses of SimpleNode to customize the way the node appears when the tree is dumped. |
java.lang.String |
toString(java.lang.String prefix)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected ASNObject parent
protected ASNObject[] children
protected int id
protected Parser parser
protected java.lang.String name
protected Tag tag
protected boolean optional
protected java.lang.Object value
cryptix.asn1.lang.ASNObject.ASNObject.setValue(java.lang.Object)protected java.lang.Object defaultValue
| Constructor Detail |
public SimpleNode(int i)
public SimpleNode(Parser p,
int i)
| Method Detail |
public static final SimpleNode getInstance(Parser p,
Tag tag)
public void jjtOpen()
NodejjtOpen in interface Nodepublic void jjtClose()
NodejjtClose in interface Nodepublic void jjtSetParent(Node n)
NodejjtSetParent in interface Nodepublic Node jjtGetParent()
jjtGetParent in interface Nodepublic ASNObject getParent()
getParent in interface ASNObject
public void jjtAddChild(Node n,
int i)
NodejjtAddChild in interface Nodepublic Node jjtGetChild(int i)
NodejjtGetChild in interface Nodepublic ASNObject getChild(int i)
public ASNObject[] getChildren()
getChildren in interface ASNObjectpublic int jjtGetNumChildren()
NodejjtGetNumChildren in interface Node
public java.lang.Object jjtAccept(ParserVisitor visitor,
java.lang.Object data)
throws java.io.IOException
jjtAccept in interface Node
public java.lang.Object childrenAccept(ParserVisitor visitor,
java.lang.Object data)
throws java.io.IOException
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String prefix)
public Parser getParser()
cryptix.asn1.lang.Parser handling
this ASN.1 object.public int getID()
getID in interface ASNObjectpublic void setName(java.lang.String name)
public java.lang.String getName()
getName in interface ASNObjectpublic ASNObject getComponent(java.lang.String aName)
ASNObjectASNObject instance:
"certificateInfo.signature.algorithm"
getComponent in interface ASNObjectcryptix.asn1.lang.ASNObjectpublic void setTag(Tag tag)
ASNObjectTag.setTag in interface ASNObjectcryptix.asn1.lang.ASNObjectTagpublic Tag getTag()
ASNObjectTag.getTag in interface ASNObjectcryptix.asn1.lang.ASNObjectTag.Tagpublic boolean isOptional()
ASNObjectisOptional in interface ASNObjectcryptix.asn1.lang.ASNObjectpublic void setOptional(boolean flag)
ASNObjectsetOptional in interface ASNObjectpublic void setValue(java.lang.Object value)
ASNObjectThe mapping between ASN.1 types and Java types is given below:
setValue in interface ASNObjectpublic java.lang.Object getValue()
ASNObjectsetValue() method.getValue in interface ASNObjectcryptix.asn1.lang.ASNObjectASNObject.setValue(java.lang.Object)public void setDefaultValue(java.lang.Object defaultValue)
ASNObjectsetDefaultValue in interface ASNObjectcryptix.asn1.lang.ASNObjectdefaultValue - The Java object instance representing
the default value of this ASN.1 object.public java.lang.Object getDefaultValue()
ASNObjectgetDefaultValue in interface ASNObjectpublic void dump()
ASNObjectdump in interface ASNObjectpublic void dump(java.lang.String prefix)
ASNObjectdump in interface ASNObjectcryptix.asn1.lang.ASNObjectprefix - A string that will prefix each new line
of the output.
public java.lang.Object accept(ParserVisitor visitor,
java.lang.Object data)
throws java.io.IOException
ASNObjectaccept in interface ASNObjectcryptix.asn1.lang.ASNObjectvisitor - An instance that implements the ParserVisitor
interface.java.io.IOException - If an exception occurs during
the application of the Visitor method.ParserVisitor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||