public class ConstantInfo extends Object implements LangElement, Cloneable
| Constructor and Description |
|---|
ConstantInfo(String name,
Type type,
boolean isPrivate) |
ConstantInfo(String name,
Type type,
boolean isPrivate,
boolean isLiteral,
Object literalValue) |
ConstantInfo(String name,
Type type,
boolean isPrivate,
boolean isLiteral,
Object literalValue,
Map<String,String> metadata) |
| Modifier and Type | Method and Description |
|---|---|
ConstantInfo |
clone() |
Object |
getData()
Returns the associated element data.
|
Object |
getLiteralValue()
If the constant is
literal, returns the literal value. |
Map<String,String> |
getMetadata()
Returns the metadata of this type
|
String |
getMetadata(String key)
Returns the metadata stored under a given key.
|
Module |
getModule() |
String |
getName()
Returns the element name.
|
Type |
getType() |
boolean |
hasMetadata(String key)
Returns
true if the metadata contain the given key. |
boolean |
isLiteral()
Returns
true if the constant definition is a literal. |
boolean |
isPrivate() |
void |
setData(Object data) |
public ConstantInfo(String name, Type type, boolean isPrivate)
name - type - isPrivate - public ConstantInfo(String name, Type type, boolean isPrivate, boolean isLiteral, Object literalValue)
name - type - isPrivate - isLiteral - true if the constant definition is a literalliteralValue - the literal valuepublic Module getModule()
public String getName()
LangElementgetName in interface LangElementpublic Type getType()
public boolean isPrivate()
public boolean isLiteral()
true if the constant definition is a literal.true if the constant definition is a literalpublic Object getLiteralValue()
literal, returns the literal value.public Map<String,String> getMetadata()
LangElementgetMetadata in interface LangElementpublic String getMetadata(String key)
LangElementgetMetadata in interface LangElementpublic boolean hasMetadata(String key)
LangElementtrue if the metadata contain the given key.hasMetadata in interface LangElementtrue if the metadata contain the given keypublic Object getData()
LangElementgetData in interface LangElementpublic void setData(Object data)
data - public ConstantInfo clone()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.