com.googlecode.objectify.impl
Class FieldWrapper

java.lang.Object
  extended by com.googlecode.objectify.impl.FieldWrapper
All Implemented Interfaces:
Wrapper

public class FieldWrapper
extends java.lang.Object
implements Wrapper

Wrapper which makes a field look just like... a field. More importantly, we can also make methods look just like this.


Constructor Summary
FieldWrapper(java.lang.reflect.Field field)
           
 
Method Summary
 java.lang.Object get(java.lang.Object pojo)
          Get the value of the thing thing (field) if possible, or null if not possible (method)
 java.lang.reflect.Type getGenericType()
          Get the "generictype", which can be a ParameterizedType
 java.lang.Class<?> getType()
          Get the type of the thing.
 boolean isSerialized()
           
 void set(java.lang.Object pojo, java.lang.Object value)
          Actually set the thing (field or method) on an object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldWrapper

public FieldWrapper(java.lang.reflect.Field field)
Method Detail

getType

public java.lang.Class<?> getType()
Description copied from interface: Wrapper
Get the type of the thing. Might return null when unknown (ie content of Collection with no generic type)

Specified by:
getType in interface Wrapper

getGenericType

public java.lang.reflect.Type getGenericType()
Description copied from interface: Wrapper
Get the "generictype", which can be a ParameterizedType

Specified by:
getGenericType in interface Wrapper

set

public void set(java.lang.Object pojo,
                java.lang.Object value)
Description copied from interface: Wrapper
Actually set the thing (field or method) on an object

Specified by:
set in interface Wrapper

get

public java.lang.Object get(java.lang.Object pojo)
Description copied from interface: Wrapper
Get the value of the thing thing (field) if possible, or null if not possible (method)

Specified by:
get in interface Wrapper

isSerialized

public boolean isSerialized()
Specified by:
isSerialized in interface Wrapper
Returns:
true if the value should be deserialized from blob

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1