gov.llnl.babel.symbols
public class SymbolID extends ASTNode implements java.lang.Comparable
SymbolID
class represents the name of a symbol,
which consists of a fully qualified name (e.g., "sidl.Object") and
a version number. The equals
and hashCode
members have been defined such that two symbol ids are considered
equal if they have the same version and string.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCOPE |
Constructor and Description |
---|
SymbolID(java.lang.String fully_qualified_name,
Version version)
The constructor for the
SymbolID class takes a
fully qualified symbol name and a symbol version. |
SymbolID(java.lang.String fully_qualified_name,
Version version,
boolean fromxml)
The constructor for the
SymbolID class takes a
fully qualified symbol name and a symbol version. |
SymbolID(SymbolID id) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compare this
SymbolID with another one. |
boolean |
equals(java.lang.Object obj)
Two symbol identifiers are identical only if they have the same
symbol identifiers and the same version.
|
boolean |
fromXML() |
java.lang.String |
getFullName()
Return the fully qualified name of the symbol.
|
java.lang.String |
getShortName()
Return the short, relative name of the symbol.
|
static java.lang.String |
getShortName(java.lang.String fqn)
Return the short, relative name of the fully qualified name.
|
java.lang.String |
getSymbolName()
Return the symbol name of the form "NAME-vVERSION".
|
Version |
getVersion()
Return the version of the symbol.
|
int |
hashCode()
Return the hash code of the symbol name as the hash value for a
symbol identifier to facilitiate searching in hash tables.
|
boolean |
isSymbolBindC()
Return true if symbol is something the bindC array
manipulation can deal with
|
void |
setFromXML(boolean fromxml) |
checkFrozen, clone, freeze, protectCollection, protectList, protectMap, protectSet
public static final java.lang.String SCOPE
public SymbolID(java.lang.String fully_qualified_name, Version version)
SymbolID
class takes a
fully qualified symbol name and a symbol version.public SymbolID(SymbolID id)
public SymbolID(java.lang.String fully_qualified_name, Version version, boolean fromxml)
SymbolID
class takes a
fully qualified symbol name and a symbol version.
Flag fromxml indicates whether symbol originates from xml repository.public java.lang.String getFullName()
public static java.lang.String getShortName(java.lang.String fqn)
public java.lang.String getShortName()
public boolean isSymbolBindC()
public Version getVersion()
public java.lang.String getSymbolName()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
SymbolID
with another one.compareTo
in interface java.lang.Comparable
public boolean fromXML()
public void setFromXML(boolean fromxml)