Package jodd.madvoc.meta

Examples of jodd.madvoc.meta.InOut


      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());
View Full Code Here


      }
      if (in == null && pd.getReadMethodDescriptor() != null) {
        in = pd.getReadMethodDescriptor().getMethod().getAnnotation(In.class);
      }

      InOut inout = null;

      if (pd.getFieldDescriptor() != null) {
        inout = pd.getFieldDescriptor().getField().getAnnotation(InOut.class);
      }
      if (inout == null && pd.getWriteMethodDescriptor() != null) {
View Full Code Here

TOP

Related Classes of jodd.madvoc.meta.InOut

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.