Examples of Out


Examples of com.gwtplatform.dispatch.annotation.Out

        }
    }

    protected void sortOutFields(SortedMap<Integer, VariableElement> sortedFields, Collection<VariableElement> fields) {
        for (VariableElement fieldElement : fields) {
            Out outFieldAnnotation = fieldElement.getAnnotation(Out.class);
            if (outFieldAnnotation != null) {
                sortedFields.put(outFieldAnnotation.value(), fieldElement);
            }
        }
    }
View Full Code Here

Examples of jodd.madvoc.meta.Out

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

Examples of jodd.madvoc.meta.Out

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

      Out out = null;

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

Examples of net.sf.laja.parser.template.Out

        for (Outputmethod om : odlist) {
          if (output.isDefined()) {
            commentList.add(om.getStatement());
          }
        }
        Out out = new Out(phase, output.getClassName(phase), output.getArgClass(), commentList, output.isReceive(phase), output.isPushPop(phase));
        outList.add(out);
       
        output.writeSetStatement(phase, out);
      }
    }
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

    }
   
    // Loop through all fields to check for outputs
    for(Field field : curClass.getFields())
    {
      Out anno = getAnnotation(field.getAnnotations(), Out.class);
      if(anno != null)
      {
        String name = anno.name();
        Object value = null;
        try {
          value = field.get(moduleObject);
        } catch (IllegalArgumentException e) {
          throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
          throw new RuntimeException("Output field '"+field+"' in module '"+instance.module().source()+"' not accessible. ");
        }
       
        outputs.put(name, value);
      }
    }
   
    // Loop through all methods to check for outputs
    for(Method method : curClass.getMethods())
    {
      Out anno = getAnnotation(method.getAnnotations(), Out.class);
     
      if(anno != null)
      {
        String name = anno.name();
        Object value = null;
        try {
          value = method.invoke(moduleObject);
        } catch (IllegalArgumentException e) {
          throw new RuntimeException(e);
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

    Method[] methods = theClass.getMethods();
    Field[] fields = theClass.getFields();

    for (Field f : fields)
    {
      Out outputAnnotation = getOutputAnnotations(f);
      if (outputAnnotation != null
          && outputAnnotation.name().equals(name))
      {
        JavaType jType = new JavaType(f.getType());
        return jType;
      }
    }

    for (Method m : methods)
    {
     
      Annotation[] annotations = m.getAnnotations();
      for(Annotation a : annotations){
        if(a instanceof Out){
          Out outAnnotation = (Out) a;
          if(outAnnotation.name().equals(name)){
            if(m.getReturnType().equals(Void.TYPE)){
              throw new IllegalArgumentException("@Out method with name "+((Out)a).name()+" has a void return type.");
            }
            JavaType jType = new JavaType(m.getReturnType());
            return jType;
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

      }
    }
   
    Field[] fields = theClass.getFields();
    for(Field f : fields){
      Out outputAnnotation = getOutputAnnotations(f);
      if(outputAnnotation != null)
        outputNames.add(outputAnnotation.name());
    }
   
    return outputNames;
  }
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

    Method[] methods = theClass.getMethods();
    Field[] fields = theClass.getFields();

    for (Field f : fields)
    {
      Out outputAnnotation = getOutputAnnotations(f);
      if (outputAnnotation != null
          && outputAnnotation.name().equals(name))
          return outputAnnotation.description();

    }

    for (Method m : methods)
    {
      //if(m.getReturnType().equals(Void.TYPE)) continue;
     
      Annotation[] annotations = m.getAnnotations();
      for(Annotation a : annotations){
        if(a instanceof Out){
          Out outAnnotation = (Out) a;
          if(outAnnotation.name().equals(name))       
            return outAnnotation.description();

        }
        if(a instanceof Main){
          Main mainAnnotation = (Main)a;
          if(mainAnnotation.name().equals(name))        
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

    Method[] methods = theClass.getMethods();
    Field[] fields = theClass.getFields();

    for (Field f : fields)
    {
      Out outputAnnotation = getOutputAnnotations(f);
      if (outputAnnotation != null
          && outputAnnotation.name().equals(name))
      {
        return outputAnnotation.print();
      }
    }

    for (Method m : methods)
    {
     
      Annotation[] annotations = m.getAnnotations();
      for(Annotation a : annotations){
        if(a instanceof Out){
          Out outAnnotation = (Out) a;
          if(outAnnotation.name().equals(name)){
            return outAnnotation.print();

          }
        }
        if(a instanceof Main){
          Main mainAnnotation = (Main)a;
View Full Code Here

Examples of org.data2semantics.platform.annotation.Out

   */
  public static Object getOutputField(Object instance, String outputName) throws IllegalArgumentException, IllegalAccessException{
    Object result= null;
    for(Field f : instance.getClass().getDeclaredFields()){
      if(f.isAnnotationPresent(Out.class)){
        Out outputAnnotation = f.getAnnotation(Out.class);
        if(outputName.equals(outputAnnotation.name())){
          return f.get(instance);
        }
      }
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.