public abstract class ModelASTElement extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
getSourceLocation() |
int |
hashCode() |
void |
removeSourceLocation()
Removes the source location value from this element.
|
void |
setSourceLocation(Object sourceLocation) |
abstract String |
toGroovy()
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
abstract Object |
toJSON()
Translates this element and any children it may have into JSON conforming to the schema.
|
String |
toString() |
void |
validate(ModelValidator validator)
Called to do whatever validation is necessary for this element.
|
public Object getSourceLocation()
public void setSourceLocation(Object sourceLocation)
public abstract Object toJSON()
JSONObject
or JSONArray
but for some leaf nodes, may be a String
or
other simple class.public abstract String toGroovy()
String
of Groovy code for this element and its children.public void validate(@Nonnull ModelValidator validator)
validator
- A ModelValidator
to use for more complicated validation.public void removeSourceLocation()
Copyright © 2016–2017. All rights reserved.