public class ElExtensions extends Object
| Modifier and Type | Field and Description |
|---|---|
static ElExtensionsRegistry |
registry |
| Constructor and Description |
|---|
ElExtensions() |
| Modifier and Type | Method and Description |
|---|---|
protected static Object |
_getSingleValue(Iterable<?> values) |
protected static Object |
_getSingleValue(Object value) |
static TypeElement |
asElement(TypeMirror type) |
static Element |
findByName(Iterable<?> elements,
CharSequence name) |
static Object |
get(AnnotationMirror am,
String avName)
Allows to write something like "annotation.entityClass" to access the annotation value "entityClass" of the annotation
|
static Object |
get(Element e,
String functionName) |
static Object |
get(Element e,
String functionName,
Map<String,Object> context)
Allows to apply functions on the values stack like this: element.functionName
|
static Object |
get(org.eclipse.xtext.xbase.lib.Functions.Function1<String,?> function,
String propertyName)
An Xtend closure with one (String) parameter can be used like "closure.fooBar".
|
static TypeElement |
getAsElement(TypeMirror type) |
static CharSequence |
getAsType(String qualName) |
static org.eclipse.xtext.xbase.lib.Functions.Function1<String,org.eclipse.xtext.xbase.lib.Functions.Function1<CharSequence,Object>> |
getAt(Element e)
The annotations of the element as Function from annotation class name to annotation, where annotation is again a function from
annotation value name to annotation value.
|
static CharSequence |
getCode(TypeMirror type) |
static List<ExecutableElement> |
getDeclaredConstructors(DeclaredType t) |
static List<ExecutableElement> |
getDeclaredConstructors(TypeElement type) |
static List<VariableElement> |
getDeclaredFields(DeclaredType t) |
static List<VariableElement> |
getDeclaredFields(TypeElement type) |
static List<ExecutableElement> |
getDeclaredMethods(DeclaredType t) |
static List<ExecutableElement> |
getDeclaredMethods(TypeElement type) |
static List<TypeElement> |
getDeclaredTypes(DeclaredType t) |
static List<TypeElement> |
getDeclaredTypes(TypeElement type) |
static String |
getName(Element e)
name as alias for getSimpleName().toString().
|
static CharSequence |
getName(TypeMirror type) |
static List<PropertyImpl> |
getProperties(DeclaredType t) |
static List<PropertyImpl> |
getProperties(TypeElement e) |
static org.eclipse.xtext.xbase.lib.Pair<Boolean,Object> |
getPropertyFromExtensions(Map<String,Object> rootProperties,
Object base,
String propertyName)
Der Key sagt, ob die Property gefunden wurde.
|
static Name |
getQualifiedName(DeclaredType t) |
static Name |
getSimpleName(DeclaredType t) |
static Object |
getSingleValue(Object values) |
static TypeMirror |
getSingleValueType(Element e) |
static String |
getToFirstLower(CharSequence s) |
static String |
getToFirstUpper(CharSequence s) |
static Map<String,Object> |
getValueStack() |
static boolean |
hasType(Element e,
CharSequence fqn) |
static Object |
invoke(Object functionObject,
Object base,
Object[] params) |
static Object |
invokeMethod(Object base,
String name,
Class<?>[] paramTypes,
Object[] params,
Map<String,Object> contextMap) |
static Object |
invokeMethod(Object base,
String name,
Object params) |
static org.eclipse.xtext.xbase.lib.Pair<Boolean,Object> |
invokeMethodFromExtensions(Map<String,Object> rootProperties,
Object base,
String methodName,
Class<?>[] paramTypes,
Object[] params) |
static boolean |
isSame(TypeMirror type1,
TypeMirror type2) |
static void |
registerExtensionMethods(ElExtensionsRegistry registry) |
static void |
registerExtensionProperties(ElExtensionsRegistry registry) |
public static final ElExtensionsRegistry registry
public static TypeElement getAsElement(TypeMirror type)
public static TypeElement asElement(TypeMirror type)
public static boolean isSame(TypeMirror type1, TypeMirror type2)
public static boolean hasType(Element e, CharSequence fqn)
public static TypeMirror getSingleValueType(Element e)
public static org.eclipse.xtext.xbase.lib.Functions.Function1<String,org.eclipse.xtext.xbase.lib.Functions.Function1<CharSequence,Object>> getAt(Element e)
public static Object get(org.eclipse.xtext.xbase.lib.Functions.Function1<String,?> function, String propertyName)
public static Object get(AnnotationMirror am, String avName)
public static Object get(Element e, String functionName, Map<String,Object> context)
public static List<PropertyImpl> getProperties(TypeElement e)
public static List<PropertyImpl> getProperties(DeclaredType t)
public static List<VariableElement> getDeclaredFields(TypeElement type)
public static List<VariableElement> getDeclaredFields(DeclaredType t)
public static List<ExecutableElement> getDeclaredMethods(TypeElement type)
public static List<ExecutableElement> getDeclaredMethods(DeclaredType t)
public static List<ExecutableElement> getDeclaredConstructors(TypeElement type)
public static List<ExecutableElement> getDeclaredConstructors(DeclaredType t)
public static List<TypeElement> getDeclaredTypes(TypeElement type)
public static List<TypeElement> getDeclaredTypes(DeclaredType t)
public static Name getSimpleName(DeclaredType t)
public static Name getQualifiedName(DeclaredType t)
public static CharSequence getAsType(String qualName)
public static CharSequence getName(TypeMirror type)
public static CharSequence getCode(TypeMirror type)
public static String getToFirstUpper(CharSequence s)
public static String getToFirstLower(CharSequence s)
public static Element findByName(Iterable<?> elements, CharSequence name)
public static Object invokeMethod(Object base, String name, Class<?>[] paramTypes, Object[] params, Map<String,Object> contextMap)
public static void registerExtensionProperties(ElExtensionsRegistry registry)
public static void registerExtensionMethods(ElExtensionsRegistry registry)
public static org.eclipse.xtext.xbase.lib.Pair<Boolean,Object> getPropertyFromExtensions(Map<String,Object> rootProperties, Object base, String propertyName)
public static org.eclipse.xtext.xbase.lib.Pair<Boolean,Object> invokeMethodFromExtensions(Map<String,Object> rootProperties, Object base, String methodName, Class<?>[] paramTypes, Object[] params)
Copyright © 2018. All rights reserved.