Package org.ajax4jsf.builder.model

Examples of org.ajax4jsf.builder.model.Argument


*
*/
public class SimpleMutator extends JavaMethod {
 
  public SimpleMutator(String name, JavaField field) {
    super(name, new Argument(field.getName().substring(1), field.getType()));
    addModifier(JavaModifier.PUBLIC);
    setMethodBody(new SimpleMutatorMethodBody(this, field));
  }
View Full Code Here


  }
 
  protected JavaMethod getMutator(JSFGeneratorConfiguration configuration, PropertyBean propertyBean, final JavaField field) {
    JavaMethod mutator =
      new JavaMethod(propertyBean.getSetterName(),
          new Argument(field.getName(), field.getType()));
   
    mutator.setMethodBody(new MethodBody(mutator) {
      @Override
      public String toCode() {
        return "this."  + field.getName() + " = " + field.getName() + ";";
View Full Code Here

    out.print("(");
    List<Argument> arguments = javaMethod.getArguments();
    if (arguments != null) {
      for (Iterator<Argument> iterator = arguments.iterator(); iterator.hasNext();) {
        Argument argument = iterator.next();
        out.print(argument.getType().getSimpleName());
        out.print(" ");
        out.print(argument.getName());
        if (iterator.hasNext()) {
          out.print(", ");
        }
      }
    }
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) {
          @Override
          public String toCode() {
            return "count = i;";
View Full Code Here

TOP

Related Classes of org.ajax4jsf.builder.model.Argument

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.