org.vraptor.introspector
Class FieldReadParameter

java.lang.Object
  extended by org.vraptor.introspector.FieldReadParameter
All Implemented Interfaces:
ReadParameter

public class FieldReadParameter
extends Object
implements ReadParameter

A field based read parameter.

Author:
Guilherme Silveira

Constructor Summary
FieldReadParameter(FieldAnnotation<Read> info)
           
 
Method Summary
 Type getGenericType()
           
 String getKey()
          The parameter key
 Class<? extends Converter> getOverridenConverter()
          Returns the overriden converter class attached to this read parameter
 Class<?> getType()
           
 Object guaranteeExistence(Object component, Object[] methodParams)
          Guarantees it's existence by instantiating itself if needed (or oblied), connecting to the logic component and returning itself
 boolean mightCreate()
          Should it instantiate required fields on the fly?
 void set(Object component, Object[] methodParams, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldReadParameter

public FieldReadParameter(FieldAnnotation<Read> info)
Method Detail

getKey

public String getKey()
The parameter key

Specified by:
getKey in interface ReadParameter
Returns:
key

mightCreate

public boolean mightCreate()
Should it instantiate required fields on the fly?

Specified by:
mightCreate in interface ReadParameter
Returns:
true if it should instantiate them

getOverridenConverter

public Class<? extends Converter> getOverridenConverter()
Returns the overriden converter class attached to this read parameter

Specified by:
getOverridenConverter in interface ReadParameter
Returns:
the converter class

guaranteeExistence

public Object guaranteeExistence(Object component,
                                 Object[] methodParams)
                          throws SettingException
Description copied from interface: ReadParameter
Guarantees it's existence by instantiating itself if needed (or oblied), connecting to the logic component and returning itself

Specified by:
guaranteeExistence in interface ReadParameter
Parameters:
component - the logic component
Returns:
the instantiated object itself
Throws:
SettingException - setting exception
See Also:
org.vraptor.introspector.ReadParameter#guaranteeExistence(java.lang.Object)

getType

public Class<?> getType()
Specified by:
getType in interface ReadParameter

set

public void set(Object component,
                Object[] methodParams,
                Object value)
         throws SettingException
Specified by:
set in interface ReadParameter
Throws:
SettingException

getGenericType

public Type getGenericType()
Specified by:
getGenericType in interface ReadParameter


Copyright © 2004-2008 VRaptor. All Rights Reserved.