|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.mib.symbol.Symbol | +--net.percederberg.mib.symbol.TypeSymbol
A class containing a type symbol from the MIB file. Type symbols does not support having children, neither do they have object identifiers. The corresponding methods from Symbol have been overridden to generate errors when inserting these.
Type symbols typically contains a name and a type (which should be set upon type analysis). The symbols may also link to a parent symbol.
Field Summary |
Fields inherited from class net.percederberg.mib.symbol.Symbol |
children, id, name, parent, type |
Constructor Summary | |
TypeSymbol(java.lang.String name)
Creates a new type symbol with the given name. |
Method Summary | |
protected void |
addChild(Symbol child)
Throws an exception, since this operation is not allowed for type symbols. |
java.lang.String |
getOID()
Returns an empty string, as types have no object identifiers. |
void |
setOID(int id)
Throws an exception, since this operation is not allowed for type symbols. |
Methods inherited from class net.percederberg.mib.symbol.Symbol |
childAt, children, equals, findChild, getName, getParent, getType, isField, isTopField, removeChild, setParent, setType, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TypeSymbol(java.lang.String name)
name
- the symbol nameMethod Detail |
public java.lang.String getOID()
getOID
in class Symbol
public void setOID(int id) throws java.lang.UnsupportedOperationException
setOID
in class Symbol
id
- the new OID
java.lang.UnsupportedOperationException
- thrown as this
operation is not supportedprotected void addChild(Symbol child) throws java.lang.UnsupportedOperationException
addChild
in class Symbol
child
- the child symbol
java.lang.UnsupportedOperationException
- thrown as this
operation is not supported
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |