Package org.ajax4jsf.builder.model

Examples of org.ajax4jsf.builder.model.JavaClass.addMethod()


    javaClass.addModifier(JavaModifier.PUBLIC);
   
    javaClass.addField(getComponentFamily(componentBean));
    javaClass.addField(getComponentType(componentBean));
   
    javaClass.addMethod(getConstructor(componentBean, javaClass));
   
    Collection<PropertyBean> properties = componentBean.getProperties();
   
    for (PropertyBean propertyBean : properties) {
      PropertyProcessor proc = null;
View Full Code Here


      if (proc != null) {
        proc.process(propertyBean, javaClass, configuration);
      }
    }

    javaClass.addMethod(getComponentFamilyMethod(componentBean));
   
    ComponentStateManager stateManager = new ComponentStateManager(javaClass);
   
    JavaMethod saveState = getSaveStateTemplate();
    try {
View Full Code Here

    try {
      saveState.setMethodBody(stateManager.getSaveStateMethodBody(configuration));
    } catch (GeneratorException e) {
      e.printStackTrace();
    }
    javaClass.addMethod(saveState);
   
    JavaMethod restoreState = getRestoreStateTemplate();
    try {
      restoreState.setMethodBody(stateManager.getRestoreStateMethodBody(configuration));
    } catch (GeneratorException e) {
View Full Code Here

      restoreState.setMethodBody(stateManager.getRestoreStateMethodBody(configuration));
    } catch (GeneratorException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    javaClass.addMethod(restoreState);
   
   
   
    return javaClass;
   
View Full Code Here

          }
        }
      );
    accessor.getModifiers().add(JavaModifier.PUBLIC);
    accessor.getModifiers().add(JavaModifier.FINAL);
    javaClass.addMethod(accessor);
   
    JavaMethod mutator = new JavaMethod("setCount",
        new Argument("i", int.class));
    mutator.setMethodBody(
        new MethodBody(mutator) {
View Full Code Here

        }
      );
    mutator.addAnnotation(Tezt.class);
    mutator.addModifier(JavaModifier.PUBLIC);
    mutator.addModifier(JavaModifier.FINAL);
    javaClass.addMethod(mutator);
   
    PrintWriter printWriter = new PrintWriter(System.out);
    new JavaClassRenderer().render(javaClass, printWriter);
    printWriter.flush();
  }
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.