use of jodd.madvoc.ScopeType in project jodd by oblac.
the class ScopeDataResolver method inspectOut.
/**
* Inspects single INOUT annotation as OUT.
* @see #inspectOut(jodd.madvoc.meta.Out, jodd.madvoc.ScopeType, String, Class)
*/
protected ScopeData.Out inspectOut(InOut inOut, ScopeType scopeType, String propertyName, Class propertyType) {
if (inOut == null) {
return null;
}
ScopeType scope = inOut.scope();
if (scope != scopeType) {
return null;
}
ScopeData.Out oi = new ScopeData.Out();
saveNameTarget(oi, inOut.value(), propertyName);
oi.type = propertyType;
return oi;
}
use of jodd.madvoc.ScopeType in project jodd by oblac.
the class ScopeDataResolver method resolveScopeData.
/**
* Resolve scope data in given type for all scope types.
* Returns <code>null</code> if no scope data exist.
*/
public ScopeData[] resolveScopeData(Class type) {
final ScopeType[] allScopeTypes = ScopeType.values();
ScopeData[] scopeData = new ScopeData[allScopeTypes.length];
int count = 0;
for (ScopeType scopeType : allScopeTypes) {
ScopeData sd = inspectClassScopeData(type, scopeType);
if (sd != null) {
count++;
}
scopeData[scopeType.value()] = sd;
}
if (count == 0) {
return null;
}
return scopeData;
}
use of jodd.madvoc.ScopeType in project jodd by oblac.
the class ScopeDataResolver method inspectIn.
/**
* Inspects single INOUT annotation as IN.
* @see #inspectIn(jodd.madvoc.meta.In, jodd.madvoc.ScopeType, String, Class)
*/
protected ScopeData.In inspectIn(InOut inOut, ScopeType scopeType, String propertyName, Class propertyType) {
if (inOut == null) {
return null;
}
ScopeType scope = inOut.scope();
if (scope != scopeType) {
return null;
}
ScopeData.In ii = new ScopeData.In();
saveNameTarget(ii, inOut.value(), propertyName);
ii.type = propertyType;
return ii;
}
use of jodd.madvoc.ScopeType in project jodd by oblac.
the class ScopeDataResolver method inspectOut.
/**
* Inspects single OUT annotation for a property.
*/
protected ScopeData.Out inspectOut(Out out, ScopeType scopeType, String propertyName, Class propertyType) {
if (out == null) {
return null;
}
ScopeType scope = out.scope();
if (scope != scopeType) {
return null;
}
ScopeData.Out oi = new ScopeData.Out();
saveNameTarget(oi, out.value(), propertyName);
oi.type = propertyType;
return oi;
}
use of jodd.madvoc.ScopeType in project jodd by oblac.
the class ScopeDataResolver method resolveScopeData.
/**
* Resolves scope data in given annotations for all scope types.
* Returns <code>null</code> if no scope data exist.
*/
public ScopeData[] resolveScopeData(String name, Class type, Annotation[] annotations) {
final ScopeType[] allScopeTypes = ScopeType.values();
ScopeData[] scopeData = new ScopeData[allScopeTypes.length];
int count = 0;
for (ScopeType scopeType : allScopeTypes) {
ScopeData sd = inspectMethodParameterScopeData(name, type, annotations, scopeType);
if (sd != null) {
count++;
}
scopeData[scopeType.value()] = sd;
}
if (count == 0) {
return null;
}
return scopeData;
}