Examples of JavaMethod


Examples of com.thoughtworks.qdox.model.JavaMethod

        final DNAAttributeInterceptor interceptor = new DNAAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "type", "Foo" );
        parameters.setProperty( "optional", "true" );
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        final JavaMethod method = new JavaMethod();
        method.setParentClass( new MockJavaClass() );
        final Attribute result =
            interceptor.processMethodAttribute( method, attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "dna.dependency", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

Examples of com.thoughtworks.qdox.model.JavaMethod

        throws Exception
    {
        final DNAAttributeInterceptor interceptor = new DNAAttributeInterceptor();
        final Properties parameters = new Properties();
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        final JavaMethod method = new JavaMethod();
        method.setParentClass( new MockJavaClass() );
        try
        {
            interceptor.processMethodAttribute( method, attribute );
        }
        catch( final IllegalArgumentException iae )
View Full Code Here

Examples of com.thoughtworks.qdox.model.JavaMethod

    {
        final DNAAttributeInterceptor interceptor = new DNAAttributeInterceptor();
        final Properties parameters = new Properties();
        parameters.setProperty( "type", "Foo" );
        final Attribute attribute = new Attribute( "dna.dependency", parameters );
        final JavaMethod method = new JavaMethod();
        method.setParentClass( new MockJavaClass() );
        final Attribute result =
            interceptor.processMethodAttribute( method, attribute );
        assertNotNull( "attribute", result );
        assertEquals( "attribute.name", "dna.dependency", result.getName() );
        assertEquals( "attribute.value", null, result.getValue() );
View Full Code Here

Examples of jadx.api.JavaMethod

    if (node instanceof JavaClass) {
      JClass p = (JClass) makeFrom(node.getDeclaringClass());
      return new JClass((JavaClass) node, p);
    }
    if (node instanceof JavaMethod) {
      JavaMethod mth = (JavaMethod) node;
      return new JMethod(mth, new JClass(mth.getDeclaringClass()));
    }
    if (node instanceof JavaField) {
      JavaField fld = (JavaField) node;
      return new JField(fld, new JClass(fld.getDeclaringClass()));
    }
View Full Code Here

Examples of javax.tools.diagnostics.runtime.java.JavaMethod

    assertNotNull("Unable to find this class", thisClass);
   
    Iterator methods = thisClass.getDeclaredMethods().iterator();
    boolean found=false;
    while(methods.hasNext()) {
      JavaMethod method = (JavaMethod) methods.next();
     
      if (method.getName().equals(SetupJavaMethod_getName.methodName)) {
        found = true;
        break;
      }
    }
   
View Full Code Here

Examples of net.percederberg.grammatica.code.java.JavaMethod

            modifiers = JavaClass.PACKAGE_LOCAL;
        }
        this.cls = new JavaClass(modifiers,
                                 gen.getBaseName() + "Tokenizer",
                                 "Tokenizer");
        this.initMethod = new JavaMethod(JavaMethod.PRIVATE,
                                         "createPatterns",
                                         "",
                                         "void");
        initializeCode();
    }
View Full Code Here

Examples of no.hal.jex.JavaMethod

    return super.getImage(object);
  }

  @Override
  public String getImageName(Object object) {
    JavaMethod javaMethod = (JavaMethod)object;
    return JDT_UI_IMAGE_PREFIX + "meth" + getAccessModifierString(javaMethod, -1, null).substring(0, 3) + "_obj.gif";
  }
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaMethod

  @Override
  public void process(PropertyBean propertyBean, JavaClass javaClass,
      JSFGeneratorConfiguration configuration) {

    JavaField field = getField(propertyBean, configuration);
    JavaMethod accessor = getAccessor(configuration, propertyBean, field);
    JavaMethod mutator = getMutator(configuration, propertyBean, field);
   
    if("action".equals(propertyBean.getName())) {
     
      try {
        accessor.setMethodBody(new VelocityMethodBody(configuration) {
          @Override
          public String getTemplate() {
            return "snippets/get-action.vm";
          }
        });
        mutator.setMethodBody(new VelocityMethodBody(configuration) {
          @Override
          public String getTemplate() {
            return "snippets/set-action.vm";
          }
        });
View Full Code Here

Examples of org.apache.axis.utils.cache.JavaMethod

    }

    public void testGetMethodWithVectorMethods()
    {
        Class vector = new java.util.Vector().getClass();
        JavaMethod jmAdd = new JavaMethod(vector, "add");
        assertNotNull(jmAdd);
       
        Method methodWithOneParam = jmAdd.getMethod(1);
        assertEquals("add", methodWithOneParam.getName());
        Method methodWithTwoParams = jmAdd.getMethod(2);
        assertEquals("add", methodWithTwoParams.getName());

        assertEquals("boolean", methodWithOneParam.getReturnType().getName());
        assertEquals("void", methodWithTwoParams.getReturnType().getName());
       
        boolean gotError = false;
        try {
            Method nonceMethod = jmAdd.getMethod(0); //should be no add() method with 0 params
            nonceMethod.getName();
        }
        catch (NullPointerException ex) {
            gotError = true;
        }
        assertTrue("Expected NullPointerException", gotError);

        //on the other hand, make sure methods with 0 params work...
        JavaMethod jmCapacity = new JavaMethod(vector, "capacity");
        Method methodWithNoParams = jmCapacity.getMethod(0);
        assertEquals("capacity", methodWithNoParams.getName());
    }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaMethod

    public OperationProcessor(ToolContext c) {
        super(c);
    }

    public void process(JavaInterface intf, OperationInfo operation) throws ToolException {
        JavaMethod method = new MethodMapper().map(operation);
        method.setInterface(intf);
        processMethod(method, operation, null);
        Collection<FaultInfo> faults = operation.getFaults();
        FaultProcessor faultProcessor = new FaultProcessor(context);
        faultProcessor.process(method, faults);

        method.annotate(new WSActionAnnotator(operation));

        intf.addMethod(method);
    }
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.