Errai 3.0.1-SNAPSHOT

org.jboss.errai.marshalling.rebind.util
Class MarshallingGenUtil

java.lang.Object
  extended by org.jboss.errai.marshalling.rebind.util.MarshallingGenUtil

public class MarshallingGenUtil
extends Object

Author:
Mike Brock , Christian Sadilek

Field Summary
static String ARRAY_VAR_PREFIX
           
static String ERRAI_DOLLARSIGN_REPLACEMENT
           
static String ERRAI_UNDERSCORE_REPLACEMENT
           
 
Constructor Summary
MarshallingGenUtil()
           
 
Method Summary
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARRAY_VAR_PREFIX

public static final String ARRAY_VAR_PREFIX
See Also:
Constant Field Values

ERRAI_DOLLARSIGN_REPLACEMENT

public static final String ERRAI_DOLLARSIGN_REPLACEMENT
See Also:
Constant Field Values

ERRAI_UNDERSCORE_REPLACEMENT

public static final String ERRAI_UNDERSCORE_REPLACEMENT
See Also:
Constant Field Values
Constructor Detail

MarshallingGenUtil

public MarshallingGenUtil()
Method Detail

getVarName

public static String getVarName(MetaClass clazz)

getVarName

public static String getVarName(Class<?> clazz)

getArrayVarName

public static String getArrayVarName(String clazz)

getVarName

public static String getVarName(String clazz)

findGetterMethod

public static MetaMethod findGetterMethod(MetaClass cls,
                                          String key)

getConcreteCollectionElementType

public static MetaClass getConcreteCollectionElementType(MetaClass toType)
Returns the element type of the given metaclass under the following conditions:

Parameters:
toType - The type to check for a known concrete collection element type.
Returns:
The concrete element type meeting all above-mentioned criteria, or null if one or more of the criteria fails.

getConcreteElementType

public static MetaClass getConcreteElementType(MetaClass toType)
Returns the element type of the given metaclass under the following conditions:

Parameters:
toType - The type to check for a known concrete collection element type.
Returns:
The concrete element type meeting all above-mentioned criteria, or null if one or more of the criteria fails.

getConcreteMapKeyType

public static MetaClass getConcreteMapKeyType(MetaClass toType)
Returns the map key type of the given metaclass under the following conditions:

Parameters:
toType - The type to check for a known concrete map key type.
Returns:
The concrete map key type meeting all above-mentioned criteria, or null if one or more of the criteria fails.

getConcreteMapValueType

public static MetaClass getConcreteMapValueType(MetaClass toType)
Returns the map value type of the given metaclass under the following conditions:

Parameters:
toType - The type to check for a known concrete map key type.
Returns:
The concrete map value type meeting all above-mentioned criteria, or null if one or more of the criteria fails.

getDefaultArrayMarshallers

public static Collection<MetaClass> getDefaultArrayMarshallers()

isUseStaticMarshallers

public static boolean isUseStaticMarshallers()

isForceStaticMarshallers

public static boolean isForceStaticMarshallers()

ensureMarshallerFieldCreated

public static void ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder,
                                                MetaClass marshallerForType,
                                                MetaClass type,
                                                BlockBuilder<?> initMethod)

ensureMarshallerFieldCreated

public static void ensureMarshallerFieldCreated(ClassStructureBuilder<?> classStructureBuilder,
                                                MetaClass marshallerForType,
                                                MetaClass type,
                                                BlockBuilder<?> initMethod,
                                                Statement marshallerCreationCallback)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.