public abstract class ModelASTElement extends Object implements ModelASTMarkerInterface
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
getSourceLocation() |
int |
hashCode() |
protected static <T extends Collection> |
nullIfEmpty(T list) |
void |
removeSourceLocation()
Removes the source location value from this element.
|
protected static <T extends ModelASTMarkerInterface> |
removeSourceLocationsFrom(Collection<T> list)
Removes the source location value from this list of elements.
|
protected static <T extends ModelASTMarkerInterface> |
removeSourceLocationsFrom(Collection<T> list,
ModelASTMarkerInterface... items)
Removes the source location value from this list of elements.
|
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> |
removeSourceLocationsFrom(Map<K,V> map,
ModelASTMarkerInterface... items)
Removes the source location value from this map of elements.
|
protected static void |
removeSourceLocationsFrom(ModelASTMarkerInterface... items)
Removes the source location value from this list of elements 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.
|
protected static <T extends ModelASTMarkerInterface> |
toGroovy(List<T> list)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static String |
toGroovy(ModelASTMarkerInterface item)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static <T extends ModelASTMarkerInterface> |
toGroovyArgList(Collection<T> list)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> |
toGroovyArgList(Map<K,V> map,
String separator)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static <T extends ModelASTMarkerInterface> |
toGroovyBlock(String name,
List<T> list)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> |
toGroovyBlock(String name,
Map<K,V> map,
String separator)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static String |
toGroovyBlock(String name,
ModelASTMarkerInterface item)
Translates this element and any children it may have into Pipeline Config-formatted Groovy, without any indentations.
|
protected static String |
toGroovyCheckEmpty(ModelASTElementContainer item)
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.
|
protected static Object |
toJSON(ModelASTMarkerInterface item) |
protected static <T extends ModelASTMarkerInterface> |
toJSONArray(Collection<T> list) |
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> |
toJSONArray(Map<K,V> map) |
protected static Object |
toJSONCheckEmpty(ModelASTElementContainer item) |
protected static <T extends ModelASTMarkerInterface> |
toJSONObject(String key,
Collection<T> list) |
String |
toString() |
void |
validate(ModelValidator validator)
Called to do whatever validation is necessary for this element.
|
protected static <T extends ModelASTMarkerInterface> |
validate(ModelValidator validator,
List<T> list,
ModelASTMarkerInterface... items) |
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> |
validate(ModelValidator validator,
Map<K,V> map,
ModelASTMarkerInterface... items) |
protected static void |
validate(ModelValidator validator,
ModelASTMarkerInterface... items) |
public Object getSourceLocation()
public void setSourceLocation(Object sourceLocation)
@NonNull public abstract Object toJSON()
toJSON in interface ModelASTMarkerInterfaceJSONObject or JSONArray but for some leaf nodes, may be a String or
other simple class.@CheckForNull protected static Object toJSON(@CheckForNull ModelASTMarkerInterface item)
@CheckForNull protected static Object toJSONCheckEmpty(@CheckForNull ModelASTElementContainer item)
@NonNull protected static <T extends ModelASTMarkerInterface> net.sf.json.JSONArray toJSONArray(@CheckForNull Collection<T> list)
@NonNull protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> net.sf.json.JSONArray toJSONArray(@CheckForNull Map<K,V> map)
@NonNull protected static <T extends ModelASTMarkerInterface> net.sf.json.JSONObject toJSONObject(@NonNull String key, @CheckForNull Collection<T> list)
@CheckForNull protected static <T extends Collection> T nullIfEmpty(@CheckForNull T list)
@NonNull public abstract String toGroovy()
toGroovy in interface ModelASTMarkerInterfaceString of Groovy code for this element and its children.@NonNull protected static String toGroovy(@CheckForNull ModelASTMarkerInterface item)
String of Groovy code for this element and its children.@NonNull protected static String toGroovyCheckEmpty(@CheckForNull ModelASTElementContainer item)
String of Groovy code for this element and its children.@NonNull protected static <T extends ModelASTMarkerInterface> String toGroovy(List<T> list)
String of Groovy code for this element and its children.@NonNull protected static <T extends ModelASTMarkerInterface> String toGroovyArgList(Collection<T> list)
String of Groovy code for this element and its children.@NonNull protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> String toGroovyArgList(Map<K,V> map, String separator)
String of Groovy code for this element and its children.@NonNull protected static String toGroovyBlock(String name, ModelASTMarkerInterface item)
String of Groovy code for this element and its children.@NonNull protected static <T extends ModelASTMarkerInterface> String toGroovyBlock(String name, List<T> list)
String of Groovy code for this element and its children.@NonNull protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> String toGroovyBlock(String name, Map<K,V> map, String separator)
String of Groovy code for this element and its children.public void validate(@NonNull
ModelValidator validator)
validate in interface ModelASTMarkerInterfacevalidator - A ModelValidator to use for more complicated validation.protected static void validate(@NonNull
ModelValidator validator,
@CheckForNull
ModelASTMarkerInterface... items)
protected static <T extends ModelASTMarkerInterface> void validate(@NonNull ModelValidator validator, @CheckForNull List<T> list, @CheckForNull ModelASTMarkerInterface... items)
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> void validate(@NonNull ModelValidator validator, @CheckForNull Map<K,V> map, @CheckForNull ModelASTMarkerInterface... items)
public void removeSourceLocation()
removeSourceLocation in interface ModelASTMarkerInterfaceprotected static void removeSourceLocationsFrom(@CheckForNull
ModelASTMarkerInterface... items)
protected static <T extends ModelASTMarkerInterface> void removeSourceLocationsFrom(@CheckForNull Collection<T> list)
protected static <T extends ModelASTMarkerInterface> void removeSourceLocationsFrom(@CheckForNull Collection<T> list, @CheckForNull ModelASTMarkerInterface... items)
protected static <K extends ModelASTMarkerInterface,V extends ModelASTMarkerInterface> void removeSourceLocationsFrom(@CheckForNull Map<K,V> map, @CheckForNull ModelASTMarkerInterface... items)
Copyright © 2016–2021. All rights reserved.