In in = field.getAnnotation(In.class);
ScopeData.In ii = inspectIn(in, scopeType, field.getName(), fieldType);
if (ii != null) {
listIn.add(ii);
}
InOut inout = field.getAnnotation(InOut.class);
if (inout != null) {
if (in != null) {
throw new MadvocException("@InOut can not be used with @In: " + field.getDeclaringClass() + '#' + field.getName());
}
ii = inspectIn(inout, scopeType, field.getName(), field.getType());
if (ii != null) {
listIn.add(ii);
}
}
Out out = field.getAnnotation(Out.class);
ScopeData.Out oi = inspectOut(out, scopeType, field.getName(), fieldType);
if (oi != null) {
listOut.add(oi);
}
inout = field.getAnnotation(InOut.class);
if (inout != null) {
if (out != null) {
throw new MadvocException("@InOut can not be used with @Out: " + field.getDeclaringClass() + '#' + field.getName());
}
oi = inspectOut(inout, scopeType, field.getName(), field.getType());
if (oi != null) {
listOut.add(oi);
}
}
}
// methods
for (MethodDescriptor methodDescriptor : methods) {
Method method = methodDescriptor.getMethod();
String propertyName = ReflectUtil.getBeanPropertySetterName(method);
if (propertyName != null) {
In in = method.getAnnotation(In.class);
ScopeData.In ii = inspectIn(in, scopeType, propertyName, method.getParameterTypes()[0]);
if (ii != null) {
listIn.add(ii);
}
InOut inout = method.getAnnotation(InOut.class);
if (inout != null) {
if (in != null) {
throw new MadvocException("@InOut can not be used with @In: " + method.getDeclaringClass() + '#' + method.getName());
}
ii = inspectIn(inout, scopeType, propertyName, method.getParameterTypes()[0]);
if (ii != null) {
listIn.add(ii);
}
}
}
propertyName = ReflectUtil.getBeanPropertyGetterName(method);
if (propertyName != null) {
Out out = method.getAnnotation(Out.class);
ScopeData.Out oi = inspectOut(out, scopeType, propertyName, method.getReturnType());
if (oi != null) {
listOut.add(oi);
}
InOut inout = method.getAnnotation(InOut.class);
if (inout != null) {
if (out != null) {
throw new MadvocException("@InOut can not be used with @Out: " + method.getDeclaringClass() + '#' + method.getName());
}
oi = inspectOut(inout, scopeType, propertyName, method.getReturnType());