|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | 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. |
void |
setTag(Tag tag)
Sets the tag of this ASN.1 object to be the designated |
void |
setValue(java.lang.Object value)
Sets the value of this component to a native Java instance. |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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()
Node
jjtOpen in interface Nodepublic void jjtClose()
Node
jjtClose in interface Nodepublic void jjtSetParent(Node n)
Node
jjtSetParent in interface Nodepublic Node jjtGetParent()
jjtGetParent in interface Nodepublic ASNObject getParent()
getParent in interface ASNObject
public void jjtAddChild(Node n,
int i)
Node
jjtAddChild in interface Nodepublic Node jjtGetChild(int i)
Node
jjtGetChild in interface Nodepublic ASNObject getChild(int i)
public ASNObject[] getChildren()
getChildren in interface ASNObjectpublic int jjtGetNumChildren()
Node
jjtGetNumChildren in interface Node
public java.lang.Object jjtAccept(ParserVisitor visitor,
java.lang.Object data)
throws java.io.IOException
jjtAccept in interface Nodejava.io.IOException
public java.lang.Object childrenAccept(ParserVisitor visitor,
java.lang.Object data)
throws java.io.IOException
java.io.IOExceptionpublic 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 ASNObjectpublic void setTag(Tag tag)
ASNObjectTag.
setTag in interface ASNObjectTagpublic Tag getTag()
ASNObjectTag.
getTag in interface ASNObjectTag.Tagpublic boolean isOptional()
ASNObject
isOptional in interface ASNObjectpublic void setOptional(boolean flag)
ASNObject
setOptional 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 ASNObjectASNObject.setValue(java.lang.Object)public void setDefaultValue(java.lang.Object defaultValue)
ASNObject
setDefaultValue in interface ASNObjectdefaultValue - The Java object instance representing
the default value of this ASN.1 object.public java.lang.Object getDefaultValue()
ASNObject
getDefaultValue in interface ASNObjectpublic void dump()
ASNObject
dump in interface ASNObjectpublic void dump(java.lang.String prefix)
ASNObject
dump in interface 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
ASNObject
accept in interface 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||