|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastcentric.structure.basic.id.ID
public final class ID
Immutable class for an interAST ID. The first part is an ASTID
and the second part is an InternalID. Two instances are equal if
both AST IDs and internal IDs are equal.
| Constructor Summary | |
|---|---|
ID(ASTID astID,
InternalID internalID)
Creates a new instance with the specified IDs. |
|
| Method Summary | |
|---|---|
static ID |
create(ASTID astID,
AliasASTIDMapping mapping,
java.lang.String stringRepresentation)
Creates a new ID based on the string representation created by the toString() method. |
static int |
createAliasASTID(java.lang.String stringRepresentationOfAliasID)
Creates an alias AST ID from its string representation. |
static java.lang.String |
createStringRepresentationOfAliasASTID(int aliasID)
Returns the string representation of the specified alias AST ID. |
boolean |
equals(java.lang.Object obj)
|
ASTID |
getAstID()
|
InternalID |
getInternalID()
|
int |
hashCode()
|
java.lang.String |
toString()
Returns a string representation suitable for recreating a new instance which is equal to this one. |
java.lang.String |
toString(ASTID astID,
AliasASTIDMapping mapping)
Returns a compact string representation suitable for recreating a new instance which is equal to this one if the mappings compatible. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ID(ASTID astID,
InternalID internalID)
java.lang.IllegalArgumentException - if one of the arguments
is null.| Method Detail |
|---|
public static ID create(ASTID astID,
AliasASTIDMapping mapping,
java.lang.String stringRepresentation)
toString() method. That is, for any instance
id of ID the following expressions
are always true:
id.equals(ID.create(null, id.toString()) id.equals(ID.create(astID, id.toString(astID))If the AST ID part is missed in the string representation the specified AST ID will be used.
astID - AST ID used in cases where only the internal ID is
present. Can be null
if stringRepresentation has an AST ID part.mapping - Mapping for alias AST IDs to real AST IDs.
Can be nullstringRepresentation - A non-null string
representation.
java.lang.IllegalArgumentException - in case of an invalid argument.public static int createAliasASTID(java.lang.String stringRepresentationOfAliasID)
java.lang.IllegalArgumentException - if the argument is not valid.public static java.lang.String createStringRepresentationOfAliasASTID(int aliasID)
public ASTID getAstID()
public InternalID getInternalID()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
<AST ID>~<internal ID>where <AST ID> and <internal ID> are the string representations created by
ASTID.toString() and
InternalID.toString(), respectively.
toString in class java.lang.Object
public java.lang.String toString(ASTID astID,
AliasASTIDMapping mapping)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||