Package jodd.madvoc.meta

Examples of jodd.madvoc.meta.In


    for (FieldDescriptor fieldDescriptor : fields) {
      Field field = fieldDescriptor.getField();

      Class fieldType = ReflectUtil.getRawType(field.getGenericType(), actionClass);

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


    List<ScopeData.Out> listOut = new ArrayList<ScopeData.Out>(allProperties.length);

    for (PropertyDescriptor pd : allProperties) {
      // collect annotations

      In in = null;

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

TOP

Related Classes of jodd.madvoc.meta.In

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.