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