Examples of publicMethod()


Examples of org.apache.harmony.lang.C2.publicMethod()

        try {
            Method meth = C2.class.getMethod("publicMethod", (Class[])null);
            Field statField = C2.class.getField("stat");
            C2 clazz = new C2();
            assertEquals(0, clazz.stat);
            clazz.publicMethod();
            assertEquals(10, clazz.stat);
            meth.invoke(clazz, (Object[])null);
            status = ((Integer) statField.get(clazz)).intValue();
        } catch (Exception e) {
            fail(e.toString());
View Full Code Here

Examples of org.apache.harmony.lang.C2.publicMethod()

        try {
            Method meth = C2.class.getMethod("publicMethod", (Class[])null);
            Field statField = C2.class.getField("stat");
            C2 clazz = new C2();
            assertEquals(0, clazz.stat);
            clazz.publicMethod();
            assertEquals(10, clazz.stat);
            meth.invoke(clazz, (Object[])null);
            status = ((Integer) statField.get(clazz)).intValue();
        } catch (Exception e) {
            fail(e.toString());
View Full Code Here

Examples of org.apache.harmony.lang.C2.publicMethod()

        try {
            Method meth = C2.class.getMethod("publicMethod", (Class[])null);
            Field statField = C2.class.getField("stat");
            C2 clazz = new C2();
            assertEquals(0, clazz.stat);
            clazz.publicMethod();
            assertEquals(10, clazz.stat);
            meth.invoke(clazz, (Object[])null);
            status = ((Integer) statField.get(clazz)).intValue();
        } catch (Exception e) {
            fail(e.toString());
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

        = Stmt.create(mappingContext.getCodegenContext())
        .newObject(parameterizedAs(Marshaller.class, typeParametersOf(arrayType))).extend();

    final MetaClass arrayOfArrayType = arrayType.asArrayOf(1);

    classStructureBuilder.publicMethod(arrayOfArrayType, "getEmptyArray")
        .append(Stmt.load(null).returnValue())
        .finish();

    final BlockBuilder<?> bBuilder = classStructureBuilder.publicOverridesMethod("demarshall",
        Parameter.of(EJValue.class, "a0"), Parameter.of(MarshallingSession.class, "a1"));
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

    AnonymousClassStructureBuilder entityTypeSubclass =
        Stmt.newObject(MetaClassFactory.get(ErraiEntityType.class, new ParameterizedEntityType(et.getJavaType())))
            .extend();

    entityTypeSubclass.publicMethod(et.getJavaType(), "newInstance")
        .append(Stmt.nestedCall(Stmt.newObject(et.getJavaType())).returnValue())
        .finish();

    generateLifecycleEventDeliveryMethods(met, entityTypeSubclass, globalListeners);
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

    AnonymousClassStructureBuilder entityTypeSubclass =
            Stmt.newObject(MetaClassFactory.get(ErraiEntityType.class, new ParameterizedEntityType(et.getJavaType())))
            .extend();

    entityTypeSubclass.publicMethod(et.getJavaType(), "newInstance")
    .append(Stmt.nestedCall(Stmt.newObject(et.getJavaType())).returnValue())
    .finish();

    generateLifecycleEventDeliveryMethods(met, entityTypeSubclass);
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

                .newObject(parameterizedAs(Marshaller.class, typeParametersOf(toMap))).extend();

        final MetaClass arrayType = toMap.asArrayOf(1);
        classStructureBuilder.privateField("EMPTY_ARRAY", arrayType).initializesWith(Stmt.newArray(toMap, 0)).finish();

        classStructureBuilder.publicMethod(arrayType, "getEmptyArray")
            .append(Stmt.loadClassMember("EMPTY_ARRAY").returnValue())
            .finish();

        classStructureBuilder.publicOverridesMethod("getTypeHandled")
            .append(Stmt.load(toMap).returnValue())
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

   */
  private ObjectBuilder generateNewInstanceOfPageImpl(MetaClass pageClass, String pageName) {
    AnonymousClassStructureBuilder pageImplBuilder = ObjectBuilder.newInstanceOf(
            MetaClassFactory.parameterizedAs(PageNode.class, MetaClassFactory.typeParametersOf(pageClass))).extend();

    pageImplBuilder
        .publicMethod(String.class, "name")
            .append(Stmt.loadLiteral(pageName).returnValue()).finish()
        .publicMethod(String.class, "toString")
            .append(Stmt.loadLiteral(pageName).returnValue()).finish()
        .publicMethod(String.class, "getURL")
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

    AnonymousClassStructureBuilder entityTypeSubclass =
            Stmt.newObject(MetaClassFactory.get(ErraiEntityType.class, new ParameterizedEntityType(et.getJavaType())))
            .extend();

    entityTypeSubclass.publicMethod(et.getJavaType(), "newInstance")
    .append(Stmt.nestedCall(Stmt.newObject(et.getJavaType())).returnValue())
    .finish();

    generateLifecycleEventDeliveryMethods(met, entityTypeSubclass);
View Full Code Here

Examples of org.jboss.errai.codegen.builder.AnonymousClassStructureBuilder.publicMethod()

   */
  private ObjectBuilder generateNewInstanceOfPageImpl(MetaClass pageClass, String pageName) {
    AnonymousClassStructureBuilder pageImplBuilder = ObjectBuilder.newInstanceOf(
            MetaClassFactory.parameterizedAs(PageNode.class, MetaClassFactory.typeParametersOf(pageClass))).extend();

    pageImplBuilder
        .publicMethod(String.class, "name")
            .append(Stmt.loadLiteral(pageName).returnValue()).finish()
        .publicMethod(Class.class, "contentType")
            .append(Stmt.loadLiteral(pageClass).returnValue()).finish()
        .publicMethod(void.class, "produceContent", Parameter.of(CreationalCallback.class, "callback"))
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.