public class ConstantDefinition extends AliasedSymbol.AliasedSymbolImpl implements TypeComparator.AliasedSemanticSymbol, ASTLocusTag.ASTLocusTagProvider
AliasedSymbol.AliasedSymbolImpl, AliasedSymbol.NoneAliasedSymbol
Modifier and Type | Field and Description |
---|---|
static Pattern |
patternCPPOperand
One of:
+ - * / | & ( ) << >> |
static Pattern |
patternDecimalNumber
Complete pattern for
floating point number,
compatible and described in Double.valueOf(String) . |
static Pattern |
patternHexNumber |
Constructor and Description |
---|
ConstantDefinition(String name,
long value,
String enumName,
ASTLocusTag astLocus)
Covering enums
|
ConstantDefinition(String name,
String value,
ASTLocusTag astLocus)
Covering defines
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object arg)
Equality test by its given
name . |
boolean |
equalSemantics(TypeComparator.SemanticEqualityOp arg)
Semantic equality test for Types exclusive its given
name . |
ASTLocusTag |
getASTLocusTag()
Returns this instance's
ASTLocusTag , if available,
otherwise returns null . |
String |
getEnumName()
Returns null if this definition was not part of an
enumeration, or if the enum was anonymous.
|
String |
getValue() |
int |
hashCode()
Hash by its given
name . |
int |
hashCodeSemantics()
Semantic hashcode for Types exclusive its given
name . |
static boolean |
isConstantExpression(String value) |
static boolean |
isCPPOperand(String s) |
static boolean |
isDecimalNumber(String s) |
boolean |
isEnum() |
static boolean |
isHexNumber(String s) |
static boolean |
isIdentifier(String value) |
static boolean |
isNumber(String s) |
String |
toString() |
addAliasedName, getAliasedNames, getAliasedString, getName, getOrigName, hasAliases, rename
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAliasedName, getAliasedNames, getAliasedString, getName, getOrigName, hasAliases, rename
public static Pattern patternHexNumber
public static Pattern patternDecimalNumber
floating point
number,
compatible and described in Double.valueOf(String)
.public static Pattern patternCPPOperand
public ConstantDefinition(String name, long value, String enumName, ASTLocusTag astLocus)
public ConstantDefinition(String name, String value, ASTLocusTag astLocus)
public ASTLocusTag getASTLocusTag()
ASTLocusTag.ASTLocusTagProvider
ASTLocusTag
, if available,
otherwise returns null
.getASTLocusTag
in interface ASTLocusTag.ASTLocusTagProvider
public final int hashCodeSemantics()
TypeComparator.SemanticEqualityOp
name
.hashCodeSemantics
in interface TypeComparator.SemanticEqualityOp
#equalSemantics(SemanticEqualityOp)
public final boolean equalSemantics(TypeComparator.SemanticEqualityOp arg)
TypeComparator.SemanticEqualityOp
name
.equalSemantics
in interface TypeComparator.SemanticEqualityOp
TypeComparator.SemanticEqualityOp.hashCodeSemantics()
public String getValue()
public String getEnumName()
public boolean isEnum()
public static boolean isConstantExpression(String value)
public static boolean isIdentifier(String value)
public static boolean isNumber(String s)
public static boolean isHexNumber(String s)
public static boolean isDecimalNumber(String s)
public static boolean isCPPOperand(String s)