Examples of addMethod()


Examples of org.jboss.forge.parser.java.JavaClass.addMethod()

            }

            javaClass.addField().setPrivate().setName(fieldName).setType(Conversation.class)
                     .addAnnotation(Inject.class);

            Method<JavaClass> beginMethod = javaClass.addMethod().setName(beginName).setReturnTypeVoid().setPublic()
                     .setBody(fieldName + ".begin(" + name + ");");

            if (timeout != null)
            {
               beginMethod.setBody(beginMethod.getBody() + "\n" + fieldName + ".setTimeout(" + timeout + ");");
View Full Code Here

Examples of org.jboss.forge.roaster.model.source.JavaClassSource.addMethod()

         }
      }
      body.append(")");
      body.append(";");
      body.append("return archive;");
      MethodSource<JavaClassSource> getDeployment = javaClass.addMethod().setName("getDeployment").setPublic()
               .setStatic(true)
               .setBody(body.toString()).setReturnType("ForgeArchive");
      getDeployment.addAnnotation("Deployment");
      String annotationBody = dependenciesAnnotationBody.toString();
      if (annotationBody.length() > 0)
View Full Code Here

Examples of org.jibx.binding.classes.ContextMethodBuilder.addMethod()

        }
       
        // finish by returning unmarshalled object reference
        mb.appendReturn("java.lang.Object");
        mb.codeComplete(false);
        mb.addMethod();
       
        // add interface if mapped class is directly unmarshallable
        if (hasname && m_class.getClassFile() == m_class.getMungedFile()) {
            addIUnmarshallableMethod();
        }
View Full Code Here

Examples of org.jibx.binding.classes.ExceptionMethodBuilder.addMethod()

        }
       
        // finish with return from constructor
        mb.appendReturn();
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the compiler version access method
        mb = new ExceptionMethodBuilder(GETVERSION_METHODNAME,
            Type.INT, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(IBindingFactory.CURRENT_VERSION_NUMBER);
View Full Code Here

Examples of org.jibx.binding.classes.MethodBuilder.addMethod()

        }
       
        // finish with return from constructor
        mb.appendReturn();
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the compiler version access method
        mb = new ExceptionMethodBuilder(GETVERSION_METHODNAME,
            Type.INT, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(IBindingFactory.CURRENT_VERSION_NUMBER);
View Full Code Here

Examples of org.jruby.RubyClass.addMethod()

        void install(RubyModule proxy) {
            if (hasLocalMethod()) {
                RubyClass singleton = proxy.getSingletonClass();
                DynamicMethod method = new StaticMethodInvoker(singleton, methods);
                singleton.addMethod(name, method);
                if (aliases != null && isPublic() ) {
                    singleton.defineAliases(aliases, this.name);
                    aliases = null;
                }
            }
View Full Code Here

Examples of org.jruby.RubyModule.addMethod()

        for (int i = 0; i < javaInstanceMethods.length; i++) {
            Method method = javaInstanceMethods[i];
            String name = method.getName();
            if (targetModule.searchMethod(name) != UndefinedMethod.INSTANCE) continue;
           
            targetModule.addMethod(name, dummyMethod);
        }
       
        return runtime.getNil();
    }
View Full Code Here

Examples of org.mule.model.resolvers.AbstractArgumentEntryPointResolver.addMethod()

public class NoArgsEntryPointResolverTestCase extends AbstractMuleTestCase
{
    public void testExplicitMethodMatch() throws Exception
    {
        AbstractArgumentEntryPointResolver resolver = new NoArgumentsEntryPointResolver();
        resolver.addMethod("bite");
        InvocationResult result = resolver.invoke(new InvalidSatsuma(), getTestEventContext("blah"));
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }

    public void testExplicitMethodMatch2() throws Exception
View Full Code Here

Examples of org.mule.model.resolvers.ExplicitMethodEntryPointResolver.addMethod()

public class ExplicitMethodEntryPointResolverTestCase extends AbstractMuleTestCase
{
    public void testMethodSetPass() throws Exception
    {
        ExplicitMethodEntryPointResolver resolver = new ExplicitMethodEntryPointResolver();
        resolver.addMethod("someBusinessMethod");
        InvocationResult result = resolver.invoke(new MultiplePayloadsTestObject(), getTestEventContext("blah"));
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }

    public void testMethodSetMatchFirst() throws Exception
View Full Code Here

Examples of org.mule.model.resolvers.NoArgumentsEntryPointResolver.addMethod()

public class NoArgsEntryPointResolverTestCase extends AbstractMuleTestCase
{
    public void testExplicitMethodMatch() throws Exception
    {
        AbstractArgumentEntryPointResolver resolver = new NoArgumentsEntryPointResolver();
        resolver.addMethod("bite");
        InvocationResult result = resolver.invoke(new InvalidSatsuma(), getTestEventContext("blah"));
        assertEquals(result.getState(), InvocationResult.State.SUCCESSFUL);
    }

    public void testExplicitMethodMatch2() throws Exception
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.