|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectname.pehl.piriti.rebind.type.TypeUtils
public final class TypeUtils
Utility methods for JTypes.
| Field Summary | |
|---|---|
protected static Map<String,String> |
interfaceToImplementation
|
| Method Summary | |
|---|---|
static boolean |
canContainId(com.google.gwt.core.ext.typeinfo.JType type)
|
static void |
collectConcreteTypes(List<com.google.gwt.core.ext.typeinfo.JClassType> concreteTypes,
com.google.gwt.core.ext.typeinfo.JType type)
Finds all concrete subtypes starting from type. |
static String |
collectionImplementationFor(String classname)
|
static com.google.gwt.core.ext.typeinfo.JField |
findField(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
Modifier... modifiers)
Tries to find the given field with the given modifier in the given type or in the supertypes of the given type. |
static com.google.gwt.core.ext.typeinfo.JMethod |
findGetter(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
com.google.gwt.core.ext.typeinfo.JType returnType,
Modifier... modifiers)
|
static com.google.gwt.core.ext.typeinfo.JMethod |
findSetter(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
com.google.gwt.core.ext.typeinfo.JType parameter,
Modifier... modifiers)
|
static com.google.gwt.core.ext.typeinfo.JClassType |
getTypeVariable(com.google.gwt.core.ext.typeinfo.JType type)
Returns the first type variable of the specified parameterized type or null if type is null or does not have any type
variables. |
static boolean |
isBoolean(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is boolean or Boolean, false otherwise. |
static boolean |
isByte(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is byte or Byte, false otherwise. |
static boolean |
isCharacter(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is char or Caharacter, false otherwise. |
static boolean |
isCollection(com.google.gwt.core.ext.typeinfo.JType type)
Return true if the collection is Collection List ArrayList LinkedList Set HashSet LinkedHashSet SortedSet TreeSet false otherwise, |
static boolean |
isDate(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is Date, false otherwise. |
static boolean |
isDefaultInstantiable(com.google.gwt.core.ext.typeinfo.JType type)
|
static boolean |
isDouble(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is double or Double, false otherwise. |
static boolean |
isFloat(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is float or Float, false otherwise. |
static boolean |
isGwtType(com.google.gwt.core.ext.typeinfo.JType type)
|
static boolean |
isInteger(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is int or Integer, false otherwise. |
static boolean |
isJavaType(com.google.gwt.core.ext.typeinfo.JType type)
|
static boolean |
isLong(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is long or Long, false otherwise. |
static boolean |
isMap(com.google.gwt.core.ext.typeinfo.JType type)
Return true if the map is Map HashMap SortedMap TreeMap false otherwise. |
static boolean |
isNumeric(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is byte or Byte short or Short int or Integer long or Long float or Float double or Double false otherwise. |
static boolean |
isShort(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is short or Short, false otherwise. |
static boolean |
isString(com.google.gwt.core.ext.typeinfo.JType type)
Returns true if the type is String, false otherwise. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Map<String,String> interfaceToImplementation
| Method Detail |
|---|
public static boolean isBoolean(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isByte(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isCharacter(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isDate(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isDouble(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isFloat(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isInteger(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isLong(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isShort(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isString(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isNumeric(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isCollection(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isMap(com.google.gwt.core.ext.typeinfo.JType type)
type -
public static boolean isJavaType(com.google.gwt.core.ext.typeinfo.JType type)
public static boolean isGwtType(com.google.gwt.core.ext.typeinfo.JType type)
public static boolean canContainId(com.google.gwt.core.ext.typeinfo.JType type)
public static String collectionImplementationFor(String classname)
public static com.google.gwt.core.ext.typeinfo.JClassType getTypeVariable(com.google.gwt.core.ext.typeinfo.JType type)
type is null or does not have any type
variables.
type -
public static void collectConcreteTypes(List<com.google.gwt.core.ext.typeinfo.JClassType> concreteTypes,
com.google.gwt.core.ext.typeinfo.JType type)
type. If type
itself is concrete the list will only contains type.
types - type - public static boolean isDefaultInstantiable(com.google.gwt.core.ext.typeinfo.JType type)
public static com.google.gwt.core.ext.typeinfo.JField findField(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
Modifier... modifiers)
modifiers is
null, the fields modifiers are not evaluated, otherwise the
field must have at least one of the specified modifiers.
type - property - modifier -
null if no such field was
found.
public static com.google.gwt.core.ext.typeinfo.JMethod findGetter(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
com.google.gwt.core.ext.typeinfo.JType returnType,
Modifier... modifiers)
public static com.google.gwt.core.ext.typeinfo.JMethod findSetter(com.google.gwt.core.ext.typeinfo.JClassType type,
String property,
com.google.gwt.core.ext.typeinfo.JType parameter,
Modifier... modifiers)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||