public class VariableInfo extends Object implements LangElement
Constructor and Description |
---|
VariableInfo(NamespaceModel namespaceModel,
String name,
Type type)
Creates a new public variable information.
|
VariableInfo(NamespaceModel namespaceModel,
String name,
Type type,
boolean isPrivate,
boolean isReadOnly)
Creates a new variable information.
|
VariableInfo(NamespaceModel namespaceModel,
String name,
Type type,
boolean isPrivate,
boolean isReadOnly,
Map<String,String> metadata)
Creates a new variable information.
|
Modifier and Type | Method and Description |
---|---|
Object |
getData()
Returns the data.
|
Map<String,String> |
getMetadata()
Returns the metadata of this variable.
|
String |
getMetadata(String key)
Returns the metadata stored under a given key.
|
String |
getName()
Returns the variable name.
|
NamespaceModel |
getNamespaceModel()
Returns the namespace model that contains this variable.
|
Type |
getType()
Returns the type of variable.
|
boolean |
hasMetadata(String key)
Returns
true if the metadata contain the given key. |
boolean |
isPrivate()
Returns whether this variable is private.
|
boolean |
isReadOnly()
Returns whether this variable is read-only.
|
void |
setData(Object data)
Sets the data.
|
String |
toString() |
public VariableInfo(NamespaceModel namespaceModel, String name, Type type)
namespaceModel
- name
- type
- type of variablepublic VariableInfo(NamespaceModel namespaceModel, String name, Type type, boolean isPrivate, boolean isReadOnly)
namespaceModel
- name
- type
- type of variableisPrivate
- true if variable is private, false if it is publicisReadOnly
- true if variable is read-onlypublic VariableInfo(NamespaceModel namespaceModel, String name, Type type, boolean isPrivate, boolean isReadOnly, Map<String,String> metadata)
namespaceModel
- name
- type
- type of variableisPrivate
- true if variable is private, false if it is publicisReadOnly
- true if variable is read-onlymetadata
- public NamespaceModel getNamespaceModel()
public String getName()
getName
in interface LangElement
public Type getType()
public boolean isPrivate()
public boolean isReadOnly()
public Map<String,String> getMetadata()
getMetadata
in interface LangElement
public String getMetadata(String key)
getMetadata
in interface LangElement
key
- 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 void setData(Object data)
data
- public Object getData()
getData
in interface LangElement
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.