public class ScopeDataResolver
extends java.lang.Object
scope data for certain types.
It does not cache anything as Scope data is cached in ActionRuntime.
Resolving only happens during the initialization, and it might be repeated for
certain types (as there is no cache), but that is acceptable to reduce memory
usage (no cache) and several lookups (for each interceptor) during every request.| Constructor and Description |
|---|
ScopeDataResolver() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<? extends java.lang.annotation.Annotation> |
detectAnnotationType(java.lang.annotation.Annotation[] annotations)
Scans annotation and returns type of Madvoc annotations.
|
protected ScopeData |
inspectClassScopeData(java.lang.Class actionClass,
ScopeType scopeType)
Inspect action for all In/Out annotations.
|
protected ScopeData.In |
inspectIn(In in,
Scope scope,
ScopeType matchingScopeType,
java.lang.String propertyName,
java.lang.Class propertyType)
Inspects single IN annotation for a property.
|
protected ScopeData |
inspectMethodParameterScopeData(java.lang.String name,
java.lang.Class type,
java.lang.annotation.Annotation[] annotations,
ScopeType scopeType)
Inspects all method parameters for scope type.
|
protected ScopeData.Out |
inspectOut(Out out,
Scope scope,
ScopeType matchingScopeType,
java.lang.String propertyName,
java.lang.Class propertyType)
Inspects single OUT annotation for a property.
|
ScopeData[] |
resolveScopeData(java.lang.Class type)
Resolve scope data in given type for all scope types.
|
ScopeData[] |
resolveScopeData(java.lang.String name,
java.lang.Class type,
java.lang.annotation.Annotation[] annotations)
Resolves scope data in given annotations for all scope types.
|
protected void |
saveNameTarget(ScopeData.In ii,
java.lang.String value,
java.lang.String propertyName)
Saves value and property name.
|
protected void |
saveNameTarget(ScopeData.Out oi,
java.lang.String value,
java.lang.String propertyName)
Saves value and property name.
|
public ScopeData[] resolveScopeData(java.lang.Class type)
null if no scope data exist.public ScopeData[] resolveScopeData(java.lang.String name, java.lang.Class type, java.lang.annotation.Annotation[] annotations)
null if no scope data exist.public java.lang.Class<? extends java.lang.annotation.Annotation> detectAnnotationType(java.lang.annotation.Annotation[] annotations)
protected ScopeData inspectMethodParameterScopeData(java.lang.String name, java.lang.Class type, java.lang.annotation.Annotation[] annotations, ScopeType scopeType)
protected void saveNameTarget(ScopeData.In ii, java.lang.String value, java.lang.String propertyName)
protected void saveNameTarget(ScopeData.Out oi, java.lang.String value, java.lang.String propertyName)
protected ScopeData.In inspectIn(In in, Scope scope, ScopeType matchingScopeType, java.lang.String propertyName, java.lang.Class propertyType)
protected ScopeData.Out inspectOut(Out out, Scope scope, ScopeType matchingScopeType, java.lang.String propertyName, java.lang.Class propertyType)
Copyright © 2003-present Jodd Team