Examples of JMethod


Examples of com.sun.codemodel.JMethod

        JCodeModel model = generator.getCodeModel();
        JDefinedClass concat = model._getClass("org.codehaus.xfire.generator.messagepart.concatPortType");
        assertNotNull(concat);
       
        JType string = model._ref(String.class);
        JMethod method = concat.getMethod("concat", new JType[] { string, string });
       
        // if there were a way to look at the annotations we would do that here.
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

        return routerClass;
    }

    private void addRouterMethod(JDefinedClass router, JDefinedClass definedClass) {
        String className = definedClass.fullName();
        JMethod method = router.method(generateMods, definedClass, definedClass.name());
        JBlock block = method.body();
        block.directStatement("return new " + className + "();");
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

    @Override
    protected void run(Set<ClassOutline> classes) {
        final JDefinedClass _interface = outline.getClassFactory().createInterface(jpackage, "Visitable", null);
    setOutput( _interface );
    final JMethod _method = getOutput().method(JMod.PUBLIC, void.class, "accept");
    final JTypeVar returnType = _method.generify("R");
    final JTypeVar exceptionType = _method.generify("E", Throwable.class);
    _method.type(returnType);
    _method._throws(exceptionType);
    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
    _method.param(narrowedVisitor, "aVisitor");
       
        for(ClassOutline classOutline : classes) {
            classOutline.implClass._implements(getOutput());
        }
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

        setOutput( _interface );
       
        for(ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
                // add the bean to the visitor
                JMethod vizMethod = getOutput().method(JMod.PUBLIC, returnType, "visit");
                vizMethod._throws(exceptionType);
                vizMethod.param(classOutline.implClass, "aBean");
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

        final JTypeVar exceptionType = _interface.generify("E", Throwable.class);
        final JClass narrowedVisitor = visitor.narrow(retType).narrow(exceptionType);
        for (ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
                // add the bean to the traverser
                JMethod traverseMethod = getOutput().method(JMod.PUBLIC, void.class, "traverse");
                traverseMethod._throws(exceptionType);
                traverseMethod.param(classOutline.implClass, "aBean");
                traverseMethod.param(narrowedVisitor, "aVisitor");
            }
        }
        jpackage.remove(scratch);
    }
View Full Code Here

Examples of com.sun.codemodel.JMethod

    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
        getOutput()._implements(narrowedVisitor);
        for (ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
                // add the method to the base vizzy
                JMethod _method = getOutput().method(JMod.PUBLIC, returnType, "visit");
                _method._throws(exceptionType);
        _method.param(classOutline.implClass, "aBean");
        _method.body()._return(JExpr._null());
            }
        }
    }
View Full Code Here

Examples of com.sun.codemodel.internal.JMethod

                impl._implements(Locatable.class);

                impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc);

                JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation");
                JVar $newLoc = setter.param(Locator.class, "newLocator");
                setter.body().assign($loc, $newLoc);
            }
        }

        return true;
    }
View Full Code Here

Examples of org.apache.kato.jvmti.javaruntime.model.JMethod

    String mGenSig = readUTFString(variablesIn);
    int modifiers = variablesIn.readInt();
    int count = variablesIn.readInt();


    JMethod jm = model.getMethod(methodID);
    jm.name = mName;
    jm.signature = mSig;
    if (mGenSig.equals(" ")) {
      jm.setGenericsignature(null); // Not currently keeping it null, left as reminder
    }
    jm.setGenericsignature(mGenSig);
    jm.mods = modifiers;

    for (int i = 0; i < count; i++) {
      JLocalVariableTableEntry jlte = nlocalVarTable();
      jm.addLocalVariableTableEntry(jlte);
    }

    // Line number table
    int lntLength = variablesIn.readInt();
    for (int i = 0; i < lntLength; i++) {
      int lNum = variablesIn.readInt();
      long bytePos = variablesIn.readLong();
      jm.addLineNumberEntry(lNum, bytePos);
    }
    c.addMethod(jm);
  }
View Full Code Here

Examples of org.apache.xmlbeans.impl.jam.JMethod

        JMethod[] interfaceMethods = interfaceJClass.getMethods();
        _methods = new MethodSignatureImpl[interfaceMethods.length];

        for (int i = 0; i < interfaceMethods.length; i++)
        {
            JMethod method = validateMethod(interfaceJClass, delegateJClass, interfaceMethods[i], loc);
            if (method != null)
                _methods[i] = new MethodSignatureImpl(getStaticHandler(), method);
            else
                valid = false;
        }
View Full Code Here

Examples of org.codehaus.jam.JMethod

    }

    JMethod[] method = soapService.schemaGenerator.getMethods();
    PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
    for (int i = 0; i < method.length; i++) {
      JMethod         jmethod   = method[i];
      AxisOperation   operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
      String          mep       = operation.getMessageExchangePattern();
      MessageReceiver mr;

      if (messageReceiverClassMap != null) {       
        if (messageReceiverClassMap.get(mep) != null) {
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.