jodd.madvoc.injector
Class ScopeDataResolver

java.lang.Object
  extended by jodd.madvoc.injector.ScopeDataResolver

public class ScopeDataResolver
extends java.lang.Object

Collection of scope data of certain type. For each action class and action method it holds an array of ScopeData objects. Each element of that array repesents data for one ScopeType. Some elements might be null as well.


Field Summary
protected  java.util.Map<java.lang.Object,ScopeData[]> scopeMap
           
 
Constructor Summary
ScopeDataResolver()
           
 
Method Summary
protected  ScopeData.In defaultRequestScopeIn(ScopeType scopeType, java.lang.String paramName, java.lang.Class propertyType)
          Creates default request scope IN data for a method parameter.
protected  void fillNameTarget(ScopeData.In ii, java.lang.String value, java.lang.String propertyName)
          Fills value and property name.
protected  void fillNameTarget(ScopeData.Out oi, java.lang.String value, java.lang.String propertyName)
          Fills value and property name.
protected  ScopeData[] inspectAllScopeData(java.lang.Object key)
          Inspects and returns scope data for all availiable scopes.
protected  ScopeData.In inspectIn(InOut inOut, ScopeType scopeType, java.lang.String propertyName, java.lang.Class propertyType)
          Inspects single INOUT annotation as IN.
protected  ScopeData.In inspectIn(In in, ScopeType scopeType, java.lang.String propertyName, java.lang.Class propertyType)
          Inspects single IN annotation for a property.
protected  ScopeData inspectMethodScopeData(java.lang.reflect.Method method, ScopeType scopeType)
          Inspects all method parameters for scope data.
protected  ScopeData.Out inspectOut(InOut inOut, ScopeType scopeType, java.lang.String propertyName, java.lang.Class propertyType)
          Inspects single INOUT annotation as OUT.
protected  ScopeData.Out inspectOut(Out out, ScopeType scopeType, java.lang.String propertyName, java.lang.Class propertyType)
          Inspects single OUT annotation for a property.
protected  ScopeData inspectScopeData(java.lang.Class actionClass, ScopeType scopeType)
          Inspect action for all In/Out annotations.
protected  ScopeData.In[] lookupIn(java.lang.Object key, ScopeType scopeType)
           
 ScopeData.In[] lookupInData(java.lang.Class actionClass, ScopeType scopeType)
          Lookups INput data for given object and scope type.
 ScopeData.In[] lookupInData(java.lang.reflect.Method actionMethod, ScopeType scopeType)
          Lookups INput data for given method and scope type.
 ScopeData.Out[] lookupOutData(java.lang.Class actionClass, ScopeType scopeType)
          Lookups OUTput data for given object and scope type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeMap

protected java.util.Map<java.lang.Object,ScopeData[]> scopeMap
Constructor Detail

ScopeDataResolver

public ScopeDataResolver()
Method Detail

lookupInData

public ScopeData.In[] lookupInData(java.lang.Class actionClass,
                                   ScopeType scopeType)
Lookups INput data for given object and scope type. Returns null if no data is found.


lookupInData

public ScopeData.In[] lookupInData(java.lang.reflect.Method actionMethod,
                                   ScopeType scopeType)
Lookups INput data for given method and scope type. Returns null if no data is found.


lookupIn

protected ScopeData.In[] lookupIn(java.lang.Object key,
                                  ScopeType scopeType)

lookupOutData

public ScopeData.Out[] lookupOutData(java.lang.Class actionClass,
                                     ScopeType scopeType)
Lookups OUTput data for given object and scope type. Returns null if no data is found.


inspectAllScopeData

protected ScopeData[] inspectAllScopeData(java.lang.Object key)
Inspects and returns scope data for all availiable scopes.


inspectMethodScopeData

protected ScopeData inspectMethodScopeData(java.lang.reflect.Method method,
                                           ScopeType scopeType)
Inspects all method parameters for scope data.


fillNameTarget

protected void fillNameTarget(ScopeData.In ii,
                              java.lang.String value,
                              java.lang.String propertyName)
Fills value and property name.


fillNameTarget

protected void fillNameTarget(ScopeData.Out oi,
                              java.lang.String value,
                              java.lang.String propertyName)
Fills value and property name.


inspectIn

protected ScopeData.In inspectIn(In in,
                                 ScopeType scopeType,
                                 java.lang.String propertyName,
                                 java.lang.Class propertyType)
Inspects single IN annotation for a property.


defaultRequestScopeIn

protected ScopeData.In defaultRequestScopeIn(ScopeType scopeType,
                                             java.lang.String paramName,
                                             java.lang.Class propertyType)
Creates default request scope IN data for a method parameter.


inspectIn

protected ScopeData.In inspectIn(InOut inOut,
                                 ScopeType scopeType,
                                 java.lang.String propertyName,
                                 java.lang.Class propertyType)
Inspects single INOUT annotation as IN.

See Also:
inspectIn(jodd.madvoc.meta.In, jodd.madvoc.ScopeType, String, Class)

inspectOut

protected ScopeData.Out inspectOut(Out out,
                                   ScopeType scopeType,
                                   java.lang.String propertyName,
                                   java.lang.Class propertyType)
Inspects single OUT annotation for a property.


inspectOut

protected ScopeData.Out inspectOut(InOut inOut,
                                   ScopeType scopeType,
                                   java.lang.String propertyName,
                                   java.lang.Class propertyType)
Inspects single INOUT annotation as OUT.

See Also:
inspectOut(jodd.madvoc.meta.Out, jodd.madvoc.ScopeType, String, Class)

inspectScopeData

protected ScopeData inspectScopeData(java.lang.Class actionClass,
                                     ScopeType scopeType)
Inspect action for all In/Out annotations. Returns null if there are no In and Out data.



Copyright © 2003-2010 Jodd Team