com.dyuproject.protostuff.runtime
Enum PolymorphicSchemaFactories

java.lang.Object
  extended by java.lang.Enum<PolymorphicSchemaFactories>
      extended by com.dyuproject.protostuff.runtime.PolymorphicSchemaFactories
All Implemented Interfaces:
PolymorphicSchema.Factory, java.io.Serializable, java.lang.Comparable<PolymorphicSchemaFactories>

public enum PolymorphicSchemaFactories
extends java.lang.Enum<PolymorphicSchemaFactories>
implements PolymorphicSchema.Factory

Polymorphic types.

Author:
David Yu
Date created:
Apr 30, 2012

Enum Constant Summary
ARRAY
           
CLASS
           
COLLECTION
           
ENUM
           
MAP
           
NUMBER
           
OBJECT
           
THROWABLE
           
 
Method Summary
static PolymorphicSchema.Factory getFactoryFromField(java.lang.Class<?> clazz)
           
static PolymorphicSchema.Factory getFactoryFromRepeatedValueGenericType(java.lang.Class<?> clazz)
           
static PolymorphicSchema getSchemaFromCollectionOrMapGenericType(java.lang.Class<?> clazz, IdStrategy strategy)
           
static PolymorphicSchemaFactories valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PolymorphicSchemaFactories[] 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
 
Methods inherited from interface com.dyuproject.protostuff.runtime.PolymorphicSchema.Factory
newSchema
 

Enum Constant Detail

ARRAY

public static final PolymorphicSchemaFactories ARRAY

NUMBER

public static final PolymorphicSchemaFactories NUMBER

CLASS

public static final PolymorphicSchemaFactories CLASS

ENUM

public static final PolymorphicSchemaFactories ENUM

COLLECTION

public static final PolymorphicSchemaFactories COLLECTION

MAP

public static final PolymorphicSchemaFactories MAP

THROWABLE

public static final PolymorphicSchemaFactories THROWABLE

OBJECT

public static final PolymorphicSchemaFactories OBJECT
Method Detail

values

public static PolymorphicSchemaFactories[] 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 (PolymorphicSchemaFactories c : PolymorphicSchemaFactories.values())
    System.out.println(c);

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

valueOf

public static PolymorphicSchemaFactories valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getFactoryFromField

public static PolymorphicSchema.Factory getFactoryFromField(java.lang.Class<?> clazz)

getFactoryFromRepeatedValueGenericType

public static PolymorphicSchema.Factory getFactoryFromRepeatedValueGenericType(java.lang.Class<?> clazz)

getSchemaFromCollectionOrMapGenericType

public static PolymorphicSchema getSchemaFromCollectionOrMapGenericType(java.lang.Class<?> clazz,
                                                                        IdStrategy strategy)


Copyright © 2009-2014. All Rights Reserved.