public abstract class ModelASTValue extends ModelASTElement implements ModelASTMethodArg
ModelASTEnvironment, ModelASTNamedArgumentList and elsewhere.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static ModelASTValue |
fromConstant(Object o,
Object sourceLocation) |
static ModelASTValue |
fromGString(String gstring,
Object sourceLocation) |
Object |
getValue()
Returns a value or an expression that represents this value.
|
int |
hashCode() |
abstract boolean |
isLiteral()
If the value can be determined without side-effect at AST parsing time,
this method returns true, and
getValue() returns its value. |
net.sf.json.JSONObject |
toJSON()
Translates this element and any children it may have into JSON conforming to the schema.
|
String |
toString() |
getSourceLocation, removeSourceLocation, setSourceLocation, toGroovy, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitremoveSourceLocation, toGroovy, validatepublic abstract boolean isLiteral()
getValue() returns its value.true if the value can be determined without side-effects at AST parsing time.public Object getValue()
secret('12345')
or even pow(2,10).
In case the value is an expression, this method returns a string represntation
suitable for the editor.
For example, if the value is foobar(x), we want the editor to show
"${foobar(x)}"public net.sf.json.JSONObject toJSON()
ModelASTElementtoJSON in interface ModelASTMethodArgtoJSON in class ModelASTElementJSONObject or JSONArray but for some leaf nodes, may be a String or
other simple class.public boolean equals(Object o)
ModelASTElementequals in class ModelASTElementpublic int hashCode()
ModelASTElementhashCode in class ModelASTElementpublic String toString()
ModelASTElementtoString in class ModelASTElementpublic static ModelASTValue fromConstant(Object o, Object sourceLocation)
public static ModelASTValue fromGString(String gstring, Object sourceLocation)
Copyright © 2016–2017. All rights reserved.