|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.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 Node
public void jjtClose()
Node
jjtClose
in interface Node
public void jjtSetParent(Node n)
Node
jjtSetParent
in interface Node
public Node jjtGetParent()
jjtGetParent
in interface Node
public ASNObject getParent()
getParent
in interface ASNObject
public void jjtAddChild(Node n, int i)
Node
jjtAddChild
in interface Node
public Node jjtGetChild(int i)
Node
jjtGetChild
in interface Node
public ASNObject getChild(int i)
public ASNObject[] getChildren()
getChildren
in interface ASNObject
public 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 Node
java.io.IOException
public java.lang.Object childrenAccept(ParserVisitor visitor, java.lang.Object data) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
public 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 ASNObject
public void setName(java.lang.String name)
public java.lang.String getName()
getName
in interface ASNObject
public ASNObject getComponent(java.lang.String aName)
ASNObject
ASNObject
instance:
"certificateInfo.signature.algorithm"
getComponent
in interface ASNObject
public void setTag(Tag tag)
ASNObject
Tag
.
setTag
in interface ASNObject
Tag
public Tag getTag()
ASNObject
Tag
.
getTag
in interface ASNObject
Tag
.Tag
public boolean isOptional()
ASNObject
isOptional
in interface ASNObject
public void setOptional(boolean flag)
ASNObject
setOptional
in interface ASNObject
public void setValue(java.lang.Object value)
ASNObject
The mapping between ASN.1 types and Java types is given below:
setValue
in interface ASNObject
public java.lang.Object getValue()
ASNObject
setValue()
method.
getValue
in interface ASNObject
ASNObject.setValue(java.lang.Object)
public void setDefaultValue(java.lang.Object defaultValue)
ASNObject
setDefaultValue
in interface ASNObject
defaultValue
- The Java object instance representing
the default value of this ASN.1 object.public java.lang.Object getDefaultValue()
ASNObject
getDefaultValue
in interface ASNObject
public void dump()
ASNObject
dump
in interface ASNObject
public void dump(java.lang.String prefix)
ASNObject
dump
in interface ASNObject
prefix
- 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 ASNObject
visitor
- 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 |