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()
LangElement
getName
in interface LangElement
public 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()
LangElement
getMetadata
in interface LangElement
public String getMetadata(String key)
LangElement
getMetadata
in interface LangElement
public boolean hasMetadata(String key)
LangElement
true
if the metadata contain the given key.hasMetadata
in interface LangElement
true
if the metadata contain the given keypublic Object getData()
LangElement
getData
in interface LangElement
public void setData(Object data)
data
- public ConstantInfo clone()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.