Examples of arg()


Examples of com.googlecode.prolog_cafe.lang.Term.arg()

      }

      // Unpack the one argument. This should also be a structure with one
      // argument per label that needs to be reported on to the caller.
      //
      submitRecord = submitRecord.arg(0);

      if (!submitRecord.isStructure()) {
        return logInvalidResult(submitRule, submitRecord);
      }
View Full Code Here

Examples of com.googlecode.prolog_cafe.lang.Term.arg()

  private void appliedBy(SubmitRecord.Label label, Term status) {
    if (status.isStructure() && status.arity() == 1) {
      Term who = status.arg(0);
      if (isUser(who)) {
        label.appliedBy = new Account.Id(((IntegerTerm) who.arg(0)).intValue());
      }
    }
  }

  private boolean isDraftVisible(ReviewDb db, ChangeData cd)
View Full Code Here

Examples of com.helger.jcodemodel.JInvocation.arg()

                varArgument = argument;
            }

            JVar result = visitorMethod1.body().decl(types._StringBuilder, nameSource.get("result"), JExpr._new(types._StringBuilder));
            JInvocation invocation = visitorMethod1.body().invoke(result, "append");
            invocation.arg(valueClass.name() + "." + capitalize(interfaceMethod1.name()) + "{");
            ToStringMethodBody body = new ToStringMethodBody(visitorMethod1.body(), result);
            if (!arguments.isEmpty() || varArgument != null) {
                JVar argument = arguments.get(0);
                body.appendParam(argument.type(), interfaceMethod1.params().get(0).name(), argument);
                for (int i = 1; i < arguments.size(); i++) {
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.arg()

    }
   
    @Test
   public void testArgErrors() throws Exception {
        ParserImpl p1 = parserImpl("int");
        checkError(list(_UnexpectedToken("an argument name", "<EOF>", 1)), _Arg(Util.<ArgModifier>list(), _Primitive(_IntType()), "NO_IDENTIFIER@1"), p1.arg(), p1);

        ParserImpl p2 = parserImpl("int boolean");
        checkError(list(_UnexpectedToken("an argument name", "'boolean'", 1)), _Arg(Util.<ArgModifier>list(), _Primitive(_IntType()), "BAD_IDENTIFIER_boolean@1"), p2.arg(), p2);

    }
View Full Code Here

Examples of com.pogofish.jadt.parser.ParserImpl.arg()

   public void testArgErrors() throws Exception {
        ParserImpl p1 = parserImpl("int");
        checkError(list(_UnexpectedToken("an argument name", "<EOF>", 1)), _Arg(Util.<ArgModifier>list(), _Primitive(_IntType()), "NO_IDENTIFIER@1"), p1.arg(), p1);

        ParserImpl p2 = parserImpl("int boolean");
        checkError(list(_UnexpectedToken("an argument name", "'boolean'", 1)), _Arg(Util.<ArgModifier>list(), _Primitive(_IntType()), "BAD_IDENTIFIER_boolean@1"), p2.arg(), p2);

    }

    /**
     * Make sure an arg list parses properly
View Full Code Here

Examples of com.sun.codemodel.JEnumConstant.arg()

            // [RESULT]
            // <Const>(...)
            // ASSUMPTION: datatype is outline-independent
            JEnumConstant constRef = type.enumConstant(constName);
            if(needsValue)
                constRef.arg(e.base.createConstant(this, new XmlString(mem.getLexicalValue())));

            if(!mem.getLexicalValue().equals(constName))
                constRef.annotate2(XmlEnumValueWriter.class).value(mem.getLexicalValue());

            // set javadoc
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

                                   JClass delegateImpl,
                                   JFieldRef toStringDelegateStyleParam) {
        final JDefinedClass implementation = co.implClass;
        final JMethod toStringMethod = implementation.method(JMod.PUBLIC, String.class, "toString");
        final JInvocation invoke = delegateImpl.staticInvoke("valueOf");
        invoke.arg(JExpr._this());
        invoke.arg(toStringDelegateStyleParam);
        toStringMethod.body()._return(invoke);
       
        JDocComment doc = toStringMethod.javadoc();
        doc.add("Generates a String representation of the contents of this type.");
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

                                   JFieldRef toStringDelegateStyleParam) {
        final JDefinedClass implementation = co.implClass;
        final JMethod toStringMethod = implementation.method(JMod.PUBLIC, String.class, "toString");
        final JInvocation invoke = delegateImpl.staticInvoke("valueOf");
        invoke.arg(JExpr._this());
        invoke.arg(toStringDelegateStyleParam);
        toStringMethod.body()._return(invoke);
       
        JDocComment doc = toStringMethod.javadoc();
        doc.add("Generates a String representation of the contents of this type.");
        doc.add("\nThis is an extension method, produced by the 'ts' xjc plugin");
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

      final JMethod m = objectFactory.method(JMod.PUBLIC | JMod.STATIC, sigType, "create" + methodName);
      m.javadoc().append("Create an instance of ").append(cc.ref);
      final JInvocation returntype = JExpr._new(cc.implRef);
      final JVar arg = m.param(JMod.FINAL, String.class, "coordinates");
      m.javadoc().addParam(arg).append("required parameter");
      returntype.arg(arg);
      m.body()._return(returntype);
      return;
    }
   
   
View Full Code Here

Examples of com.sun.codemodel.JInvocation.arg()

    final JInvocation returntype = JExpr._new(cc.implRef);
    for (final JFieldVar field : required) {

      final JVar arg = m.param(JMod.FINAL, field.type(), field.name());
      m.javadoc().addParam(arg).append("required parameter");
      returntype.arg(arg);
    }
    m.body()._return(returntype);
  }

}
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.