Examples of publicOverridesMethod()


Examples of org.jboss.errai.codegen.framework.builder.AnonymousClassStructureBuilder.publicOverridesMethod()

        /**
         *
         * MARSHAL METHOD
         *
         */
        BlockBuilder<?> marshallMethodBlock = classStructureBuilder.publicOverridesMethod("marshall",
                Parameter.of(Object.class, "a0"), Parameter.of(MarshallingSession.class, "a1"));

        marshallToJSON(marshallMethodBlock, toMap, mapping);

        marshallMethodBlock.finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.AnonymousClassStructureBuilder.publicOverridesMethod()

        marshallToJSON(marshallMethodBlock, toMap, mapping);

        marshallMethodBlock.finish();

        classStructureBuilder.publicOverridesMethod("handles", Parameter.of(EJValue.class, "a0"))
                .append(Stmt.nestedCall(Bool.and(
                        Bool.notEquals(loadVariable("a0").invoke("isObject"), null),
                        loadVariable("a0").invoke("isObject").invoke("get", SerializationParts.ENCODED_TYPE).invoke("isString").invoke("stringValue")
                                .invoke("equals", loadVariable("this").invoke("getTypeHandled").invoke("getName"))
                )).returnValue()).finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.AnonymousClassStructureBuilder.publicOverridesMethod()

        callBackBlock.append(Stmt.loadClassMember("qualifiers").invoke("add", qualifierName));
      }
      callBack = callBackBlock.finish();
    }

    callBackBlock = callBack.publicOverridesMethod("callback", Parameter.of(Message.class, "message"))
            .append(Stmt.declareVariable("msgQualifiers", new TypeLiteral<Set<String>>() {
            },
                    Stmt.loadVariable("message").invoke("get", Set.class, CDIProtocol.Qualifiers)))
            .append(Stmt
                    .if_(Bool.or(
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.AnonymousClassStructureBuilder.publicOverridesMethod()

      public Statement getMarshaller() {
        AnonymousClassStructureBuilder classStructureBuilder
                = Stmt.create(context.getCodegenContext())
                .newObject(parameterizedAs(Marshaller.class, typeParametersOf(toMap))).extend();

        classStructureBuilder.publicOverridesMethod("getTypeHandled")
                .append(Stmt.load(toMap).returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("getEncodingType")
                .append(Stmt.load("json").returnValue())
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.AnonymousClassStructureBuilder.publicOverridesMethod()

        classStructureBuilder.publicOverridesMethod("getTypeHandled")
                .append(Stmt.load(toMap).returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("getEncodingType")
                .append(Stmt.load("json").returnValue())
                .finish();

        /**
         *
 
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.impl.AnonymousClassStructureBuilderImpl.publicOverridesMethod()

      public Statement getMarshaller() {
        AnonymousClassStructureBuilderImpl classStructureBuilder
                = Stmt.create(context.getCodegenContext())
                .newObject(parameterizedAs(Marshaller.class, typeParametersOf(JSONObject.class, toMap))).extend();

        classStructureBuilder.publicOverridesMethod("getTypeHandled")
                .append(Stmt.load(toMap).returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("getEncodingType")
                .append(Stmt.load("json").returnValue())
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.impl.AnonymousClassStructureBuilderImpl.publicOverridesMethod()

        classStructureBuilder.publicOverridesMethod("getTypeHandled")
                .append(Stmt.load(toMap).returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("getEncodingType")
                .append(Stmt.load("json").returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("demarshall",
                Parameter.of(Object.class, "a0"), Parameter.of(MarshallingContext.class, "a1"))
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.impl.AnonymousClassStructureBuilderImpl.publicOverridesMethod()

        classStructureBuilder.publicOverridesMethod("getEncodingType")
                .append(Stmt.load("json").returnValue())
                .finish();

        classStructureBuilder.publicOverridesMethod("demarshall",
                Parameter.of(Object.class, "a0"), Parameter.of(MarshallingContext.class, "a1"))
                .append(Stmt.nestedCall(Stmt.newObject(toMap)
                        .withParameters(marshallers.toArray(new Object[marshallers.size()]))).returnValue())
                .finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.impl.AnonymousClassStructureBuilderImpl.publicOverridesMethod()

                Parameter.of(Object.class, "a0"), Parameter.of(MarshallingContext.class, "a1"))
                .append(Stmt.nestedCall(Stmt.newObject(toMap)
                        .withParameters(marshallers.toArray(new Object[marshallers.size()]))).returnValue())
                .finish();

        BlockBuilder<?> marshallMethodBlock = classStructureBuilder.publicOverridesMethod("marshall",
                Parameter.of(Object.class, "a0"), Parameter.of(MarshallingContext.class, "a1"));

        marshallToJSON(marshallMethodBlock, toMap);

        marshallMethodBlock.finish();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.builder.impl.AnonymousClassStructureBuilderImpl.publicOverridesMethod()

        marshallToJSON(marshallMethodBlock, toMap);

        marshallMethodBlock.finish();

        classStructureBuilder.publicOverridesMethod("handles", Parameter.of(Object.class, "a0"))
                .append(Stmt.nestedCall(Bool.and(
                        Bool.notEquals(Stmt.loadVariable("a0").invoke("isObject"), null),
                        Stmt.loadVariable("a0").invoke("isObject").invoke("get", SerializationParts.ENCODED_TYPE)
                                .invoke("equals", Stmt.loadVariable("this").invoke("getTypeHandled").invoke("getName"))
                )).returnValue()).finish();
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.