Class DslHelper
java.lang.Object
com.blackbuild.klum.ast.runtime.internal.DslHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tstatic ObjectgetAttributeValue(String name, Object instance) static StringgetBreadcrumbPath(Object instance) static Optional<org.codehaus.groovy.reflection.CachedField>getCachedField(Class<?> type, String name) static Class<?>getClassFromType(Type type) getDslHierarchyOf(Class<?> type) static StringgetElementNameForField(Class<?> type, String fieldName) static TypegetElementType(Field field) static TypegetElementType(Type type) static TypegetElementTypeOfField(Class<?> type, String name) static <T> KlumFactory<T>getFactoryOf(Class<T> type) static <T extends Annotation>
TgetFieldAnnotation(Class<?> type, String fieldName, Class<T> annotationType) getFieldsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation) static <T> TgetFieldValue(Object container, String name) getHierarchyOf(Class<?> type) getKeyField(Class<?> type) static com.blackbuild.klum.ast.FieldTypegetKlumFieldType(Field field) getMethodsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation) static StringgetModelAndBreadcrumbPath(Object instance) static StringgetModelPath(Object instance) static <T extends Annotation>
Optional<T>getOptionalFieldAnnotation(Class<?> type, String fieldName, Class<T> annotationType) getRwHierarchyOf(Class<?> rwType) getVirtualSetter(Class<?> rwType, String methodName, Class<T> type) static booleanstatic booleanstatic booleanisDslObject(Object object) static booleanstatic booleanisInstantiable(Class<?> type) static booleanstatic booleanstatic booleanisOptionalLink(@NotNull Field field) static booleanstatic booleanisRelationship(@NotNull Field field) Returns whether a schema field represents a direct or collection-valued DSL relationship.static TyperequireDslType(Type type) static <T> Class<T>requireKeyed(Class<T> type) static <T> Class<T>requireNotKeyed(Class<T> type) static StringshortNameFor(Class<?> type)
-
Field Details
-
FIELD_ANNOTATION
-
-
Method Details
-
isDslType
-
requireDslType
-
isDslObject
-
isBuilder
-
getDslHierarchyOf
-
getFactoryOf
-
getHierarchyOf
-
getElementTypeOfField
-
getElementType
-
getElementType
-
getElementNameForField
-
castTo
-
getField
-
getCachedField
-
getFieldValue
-
getKlumFieldType
-
getFieldAnnotation
public static <T extends Annotation> T getFieldAnnotation(Class<?> type, String fieldName, Class<T> annotationType) -
isClosure
-
getOptionalFieldAnnotation
public static <T extends Annotation> Optional<T> getOptionalFieldAnnotation(Class<?> type, String fieldName, Class<T> annotationType) -
getMethod
-
getKeyField
-
isKeyed
-
requireKeyed
-
requireNotKeyed
-
getRwHierarchyOf
-
isInstantiable
-
getMethodsAnnotatedWith
public static Stream<Method> getMethodsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation) -
getFieldsAnnotatedWith
public static Stream<Field> getFieldsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation) -
getVirtualSetter
-
getAttributeValue
-
getClassFromType
-
shortNameFor
-
getBreadcrumbPath
-
getModelPath
-
getModelAndBreadcrumbPath
-
isOwner
-
isLink
-
isOptionalLink
-
isRelationship
Returns whether a schema field represents a direct or collection-valued DSL relationship.
-