public final class CreatorUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeString(String value)
Escapes the
String given in parameter |
static com.google.gwt.thirdparty.guava.common.collect.ImmutableList<com.google.gwt.core.ext.typeinfo.JClassType> |
filterSubtypesForDeserialization(com.google.gwt.core.ext.TreeLogger logger,
RebindConfiguration configuration,
com.google.gwt.core.ext.typeinfo.JClassType type) |
static com.google.gwt.thirdparty.guava.common.collect.ImmutableList<com.google.gwt.core.ext.typeinfo.JClassType> |
filterSubtypesForSerialization(com.google.gwt.core.ext.TreeLogger logger,
RebindConfiguration configuration,
com.google.gwt.core.ext.typeinfo.JClassType type) |
static <T extends Annotation> |
findFirstEncounteredAnnotationsOnAllHierarchy(RebindConfiguration configuration,
com.google.gwt.core.ext.typeinfo.JClassType type,
Class<T> annotation)
Browse all the hierarchy of the type and return the first corresponding annotation it found
|
static com.google.gwt.core.ext.typeinfo.JClassType |
findFirstTypeToApplyPropertyAnnotation(JMapperType mapperType) |
static <T extends Annotation> |
getAnnotation(Class<T> annotation,
List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
Returns the first occurence of the annotation found on the types
|
static <T extends Annotation> |
getAnnotation(String annotation,
List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
Returns the first occurence of the annotation found on the types
|
static String |
getDefaultValueForType(com.google.gwt.core.ext.typeinfo.JType type)
Returns the default value of the given type.
|
static <T extends Annotation> |
isAnnotationPresent(Class<T> annotation,
List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
Returns true when one of the type has the specified annotation
|
static boolean |
isObject(com.google.gwt.core.ext.typeinfo.JType type) |
static boolean |
isObjectOrSerializable(com.google.gwt.core.ext.typeinfo.JType type) |
static boolean |
isSerializable(com.google.gwt.core.ext.typeinfo.JType type) |
public static <T extends Annotation> com.google.gwt.thirdparty.guava.common.base.Optional<T> findFirstEncounteredAnnotationsOnAllHierarchy(RebindConfiguration configuration, com.google.gwt.core.ext.typeinfo.JClassType type, Class<T> annotation)
T - type of the annotationtype - typeannotation - annotation to findpublic static <T extends Annotation> boolean isAnnotationPresent(Class<T> annotation, List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
T - Type of the annotationannotation - the annotationhasAnnotationsList - the typespublic static <T extends Annotation> com.google.gwt.thirdparty.guava.common.base.Optional<T> getAnnotation(String annotation, List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
T - Type of the annotationannotation - the annotationhasAnnotationsList - the typespublic static <T extends Annotation> com.google.gwt.thirdparty.guava.common.base.Optional<T> getAnnotation(Class<T> annotation, List<? extends com.google.gwt.core.ext.typeinfo.HasAnnotations> hasAnnotationsList)
T - Type of the annotationannotation - the annotationhasAnnotationsList - the typespublic static String getDefaultValueForType(com.google.gwt.core.ext.typeinfo.JType type)
Object : nulltype - type to find the default valuepublic static boolean isObject(com.google.gwt.core.ext.typeinfo.JType type)
type - the type to testObject, false otherwisepublic static boolean isSerializable(com.google.gwt.core.ext.typeinfo.JType type)
type - the type to testSerializable, false otherwisepublic static boolean isObjectOrSerializable(com.google.gwt.core.ext.typeinfo.JType type)
type - the type to testObject or Serializable, false otherwisepublic static com.google.gwt.thirdparty.guava.common.collect.ImmutableList<com.google.gwt.core.ext.typeinfo.JClassType> filterSubtypesForSerialization(com.google.gwt.core.ext.TreeLogger logger,
RebindConfiguration configuration,
com.google.gwt.core.ext.typeinfo.JClassType type)
public static com.google.gwt.thirdparty.guava.common.collect.ImmutableList<com.google.gwt.core.ext.typeinfo.JClassType> filterSubtypesForDeserialization(com.google.gwt.core.ext.TreeLogger logger,
RebindConfiguration configuration,
com.google.gwt.core.ext.typeinfo.JClassType type)
public static com.google.gwt.core.ext.typeinfo.JClassType findFirstTypeToApplyPropertyAnnotation(JMapperType mapperType)
mapperType - the type to search insideCopyright © 2016. All Rights Reserved.