public class MarshallingGenUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ARRAY_VAR_PREFIX |
static String |
ERRAI_DOLLARSIGN_REPLACEMENT |
static String |
ERRAI_UNDERSCORE_REPLACEMENT |
Constructor and Description |
---|
MarshallingGenUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder,
MetaClass marshallerForType,
MetaClass type,
BlockBuilder<?> initMethod) |
static void |
ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder,
MetaClass marshallerForType,
MetaClass type,
BlockBuilder<?> initMethod,
Statement marshallerCreationCallback) |
static MetaMethod |
findGetterMethod(MetaClass cls,
String key) |
static String |
getArrayVarName(String clazz) |
static MetaClass |
getConcreteCollectionElementType(MetaClass toType)
Returns the element type of the given metaclass under the following conditions:
toType is a collection type
toType has a single type parameter
toType's type parameter is not a wildcard
toType's type parameter is a non-abstract (concrete) type
toType's type parameter is not java.lang.Object
|
static MetaClass |
getConcreteElementType(MetaClass toType)
Returns the element type of the given metaclass under the following conditions:
toType has a single type parameter
toType's type parameter is not a wildcard
toType's type parameter is a non-abstract (concrete) type
toType's type parameter is not java.lang.Object
|
static MetaClass |
getConcreteMapKeyType(MetaClass toType)
Returns the map key type of the given metaclass under the following conditions:
toType is a
Map
toType's key type is not a wildcard
toType's key type is a non-abstract (concrete) type
|
static MetaClass |
getConcreteMapValueType(MetaClass toType)
Returns the map value type of the given metaclass under the following conditions:
toType is a
Map
toType's value type is not a wildcard
toType's value type is a non-abstract (concrete) type
|
static Collection<MetaClass> |
getDefaultArrayMarshallers() |
static String |
getVarName(Class<?> clazz) |
static String |
getVarName(MetaClass clazz) |
static String |
getVarName(String clazz) |
static boolean |
isForceStaticMarshallers() |
static boolean |
isUseStaticMarshallers() |
public static final String ARRAY_VAR_PREFIX
public static final String ERRAI_DOLLARSIGN_REPLACEMENT
public static final String ERRAI_UNDERSCORE_REPLACEMENT
public static MetaMethod findGetterMethod(MetaClass cls, String key)
public static MetaClass getConcreteCollectionElementType(MetaClass toType)
toType
- The type to check for a known concrete collection element type.public static MetaClass getConcreteElementType(MetaClass toType)
toType
- The type to check for a known concrete collection element type.public static MetaClass getConcreteMapKeyType(MetaClass toType)
Map
toType
- The type to check for a known concrete map key type.public static MetaClass getConcreteMapValueType(MetaClass toType)
Map
toType
- The type to check for a known concrete map key type.public static Collection<MetaClass> getDefaultArrayMarshallers()
public static boolean isUseStaticMarshallers()
public static boolean isForceStaticMarshallers()
public static void ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder, MetaClass marshallerForType, MetaClass type, BlockBuilder<?> initMethod)
public static void ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder, MetaClass marshallerForType, MetaClass type, BlockBuilder<?> initMethod, Statement marshallerCreationCallback)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.