com.stackmob.sdk.util
Enum SerializationMetadata

java.lang.Object
  extended by java.lang.Enum<SerializationMetadata>
      extended by com.stackmob.sdk.util.SerializationMetadata
All Implemented Interfaces:
Serializable, Comparable<SerializationMetadata>

public enum SerializationMetadata
extends Enum<SerializationMetadata>

This class stores some information about classes in an easily queriable form


Enum Constant Summary
MODEL
           
MODEL_ARRAY
           
OBJECT
           
OBJECT_ARRAY
           
PRIMITIVE
           
PRIMITIVE_ARRAY
           
 
Method Summary
static void ensureMetadata(Class<?> actualClass)
           
static Class<?> getComponentClass(Field field)
           
static String getFieldNameFromJsonName(Class<?> actualClass, String jsonName)
           
static SerializationMetadata getSerializationMetadata(Class<?> actualClass, String fieldName)
           
static SerializationMetadata valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SerializationMetadata[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PRIMITIVE

public static final SerializationMetadata PRIMITIVE

OBJECT

public static final SerializationMetadata OBJECT

MODEL

public static final SerializationMetadata MODEL

PRIMITIVE_ARRAY

public static final SerializationMetadata PRIMITIVE_ARRAY

OBJECT_ARRAY

public static final SerializationMetadata OBJECT_ARRAY

MODEL_ARRAY

public static final SerializationMetadata MODEL_ARRAY
Method Detail

values

public static SerializationMetadata[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SerializationMetadata c : SerializationMetadata.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SerializationMetadata valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getSerializationMetadata

public static SerializationMetadata getSerializationMetadata(Class<?> actualClass,
                                                             String fieldName)

getFieldNameFromJsonName

public static String getFieldNameFromJsonName(Class<?> actualClass,
                                              String jsonName)

ensureMetadata

public static void ensureMetadata(Class<?> actualClass)

getComponentClass

public static Class<?> getComponentClass(Field field)


Copyright © 2012 StackMob. All Rights Reserved.