com.dyuproject.protostuff.runtime
Class RuntimeFieldFactory<V>

java.lang.Object
  extended by com.dyuproject.protostuff.runtime.RuntimeFieldFactory<V>
All Implemented Interfaces:
Delegate<V>

public abstract class RuntimeFieldFactory<V>
extends java.lang.Object
implements Delegate<V>

A factory to create runtime fields based on reflection.

Author:
David Yu
Date created:
Nov 10, 2009

Constructor Summary
RuntimeFieldFactory(int id)
           
 
Method Summary
abstract
<T> MappedSchema.Field<T>
create(int number, java.lang.String name, java.lang.reflect.Field field, IdStrategy strategy)
          Creates a runtime field based on reflection.
static RuntimeFieldFactory<?> getFieldFactory(java.lang.Class<?> clazz)
          Gets the runtime field factory of the given clazz.
static RuntimeFieldFactory<?> getFieldFactory(java.lang.Class<?> clazz, IdStrategy strategy)
          Gets the runtime field factory of the given clazz.
static
<T> RuntimeFieldFactory<T>
getInline(java.lang.Class<T> typeClass)
          Returns the factory for inline (scalar) values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.dyuproject.protostuff.runtime.Delegate
getFieldType, readFrom, transfer, typeClass, writeTo
 

Constructor Detail

RuntimeFieldFactory

public RuntimeFieldFactory(int id)
Method Detail

getFieldFactory

public static RuntimeFieldFactory<?> getFieldFactory(java.lang.Class<?> clazz)
Gets the runtime field factory of the given clazz. Method overload for backwards compatibility.


getFieldFactory

public static RuntimeFieldFactory<?> getFieldFactory(java.lang.Class<?> clazz,
                                                     IdStrategy strategy)
Gets the runtime field factory of the given clazz.


getInline

public static <T> RuntimeFieldFactory<T> getInline(java.lang.Class<T> typeClass)
Returns the factory for inline (scalar) values.


create

public abstract <T> MappedSchema.Field<T> create(int number,
                                                 java.lang.String name,
                                                 java.lang.reflect.Field field,
                                                 IdStrategy strategy)
Creates a runtime field based on reflection.



Copyright © 2009-2014. All Rights Reserved.