public class VariableInfo extends java.lang.Object implements LangElement
Constructor and Description |
---|
VariableInfo(NamespaceModel namespaceModel,
java.lang.String name,
Type type)
Creates a new public variable information.
|
VariableInfo(NamespaceModel namespaceModel,
java.lang.String name,
Type type,
boolean isPrivate,
boolean isReadOnly)
Creates a new variable information.
|
VariableInfo(NamespaceModel namespaceModel,
java.lang.String name,
Type type,
boolean isPrivate,
boolean isReadOnly,
java.util.Map<java.lang.String,java.lang.String> metadata)
Creates a new variable information.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData()
Returns the data.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Returns the metadata of this variable.
|
java.lang.String |
getMetadata(java.lang.String key)
Returns the metadata stored under a given key.
|
java.lang.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(java.lang.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(java.lang.Object data)
Sets the data.
|
java.lang.String |
toString() |
public VariableInfo(NamespaceModel namespaceModel, java.lang.String name, Type type)
namespaceModel
- name
- type
- type of variablepublic VariableInfo(NamespaceModel namespaceModel, java.lang.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, java.lang.String name, Type type, boolean isPrivate, boolean isReadOnly, java.util.Map<java.lang.String,java.lang.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 java.lang.String getName()
getName
in interface LangElement
public Type getType()
public boolean isPrivate()
public boolean isReadOnly()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface LangElement
public java.lang.String getMetadata(java.lang.String key)
getMetadata
in interface LangElement
key
- 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 void setData(java.lang.Object data)
data
- public java.lang.Object getData()
getData
in interface LangElement
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.