Examples of staticRef()


Examples of com.sun.codemodel.JClass.staticRef()

        LOG.fine("Running toString() plugin.");
       
        final JClass toStringDelegateImpl = outline.getCodeModel()
            .ref("org.apache.cxf.jaxb.JAXBToStringBuilder");
        final JClass styleClass = outline.getCodeModel().ref("org.apache.cxf.jaxb.JAXBToStringStyle");
        final JFieldRef toStringDelegateStyleParam = styleClass.staticRef(styleFieldName);
       
        for (ClassOutline co : outline.getClasses()) {
            addToStringMethod(co, toStringDelegateImpl, toStringDelegateStyleParam);
        }
       
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

          if (isNullReaderLikely) {
            JConditional jc = generator.getEvalBlock()._if(isNull.eq(JExpr.lit(0)));

            JClass nrClass = generator.getModel().ref(org.apache.drill.exec.vector.complex.impl.NullReader.class);
            JExpression nullReader = nrClass.staticRef("INSTANCE");

            jc._then().assign(complexReader, expr);
            jc._else().assign(complexReader, nullReader);
          } else {
            eval.assign(complexReader, expr);
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

            JVar retVar = method.body().decl(model._ref(boolean.class), "value");
           
            JConditional cond = b._if(JExpr.lit("1").invoke("equals").arg(var).cor(JExpr.lit("true").invoke("equals").arg(var)));
            JClass boolClass = (JClass) model._ref(Boolean.class);
           
            cond._then().assign(retVar, boolClass.staticRef("TRUE"));
            cond._else().assign(retVar, boolClass.staticRef("FALSE"));
           
            return retVar;
        }
        throw new UnsupportedOperationException();
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

           
            JConditional cond = b._if(JExpr.lit("1").invoke("equals").arg(var).cor(JExpr.lit("true").invoke("equals").arg(var)));
            JClass boolClass = (JClass) model._ref(Boolean.class);
           
            cond._then().assign(retVar, boolClass.staticRef("TRUE"));
            cond._else().assign(retVar, boolClass.staticRef("FALSE"));
           
            return retVar;
        }
        throw new UnsupportedOperationException();
    }
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

    public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
        LOG.fine("Running toString() plugin.");
       
        final JClass toStringDelegateImpl = outline.getCodeModel().ref(JAXBToStringBuilder.class);
        final JClass styleClass = outline.getCodeModel().ref(JAXBToStringStyle.class);
        final JFieldRef toStringDelegateStyleParam = styleClass.staticRef(styleFieldName);
       
        for (ClassOutline co : outline.getClasses()) {
            addToStringMethod(co, toStringDelegateImpl, toStringDelegateStyleParam);
        }
       
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

    public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
        LOG.fine("Running toString() plugin.");
       
        final JClass toStringDelegateImpl = outline.getCodeModel().ref(JAXBToStringBuilder.class);
        final JClass styleClass = outline.getCodeModel().ref(JAXBToStringStyle.class);
        final JFieldRef toStringDelegateStyleParam = styleClass.staticRef(styleFieldName);
       
        for (ClassOutline co : outline.getClasses()) {
            addToStringMethod(co, toStringDelegateImpl, toStringDelegateStyleParam);
        }
       
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

        // correctly identifying which constant it maps to is hard, so
        // here I'm cheating
        JClass type = toType(outline,Aspect.EXPOSED);
        for (CEnumConstant mem : members) {
            if(mem.getLexicalValue().equals(literal.value))
                return type.staticRef(mem.getName());
        }
        return null;
    }

    @Deprecated
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

    String resourcePath = getResourcePath(resource.getPath());
    originalResourceField.init(JExpr.lit(resourcePath));

    // create reference to RestliRequestOptions.DEFAULT_OPTIONS
    final JClass restliRequestOptionsClass = getCodeModel().ref(RestliRequestOptions.class);
    JFieldRef defaultOptionsField = restliRequestOptionsClass.staticRef("DEFAULT_OPTIONS");

    if (!_config.isRestli2Format())
    {
      // same getPathComponents() logic as in RequestBuilderBase
      JMethod pathComponentsGetter = facadeClass.method(JMod.PUBLIC, String[].class, "getPathComponents");
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

            JConditional jc = generator.getEvalBlock()._if(isNull.eq(JExpr.lit(0)));

            JClass nrClass = generator.getModel().ref(org.apache.drill.exec.vector.complex.impl.NullReader.class);
            JExpression nullReader;
            if (complex) {
              nullReader = nrClass.staticRef("EMPTY_MAP_INSTANCE");
            } else if (repeated) {
              nullReader = nrClass.staticRef("EMPTY_LIST_INSTANCE");
            } else {
              nullReader = nrClass.staticRef("INSTANCE");
            }
View Full Code Here

Examples of com.sun.codemodel.JClass.staticRef()

            JClass nrClass = generator.getModel().ref(org.apache.drill.exec.vector.complex.impl.NullReader.class);
            JExpression nullReader;
            if (complex) {
              nullReader = nrClass.staticRef("EMPTY_MAP_INSTANCE");
            } else if (repeated) {
              nullReader = nrClass.staticRef("EMPTY_LIST_INSTANCE");
            } else {
              nullReader = nrClass.staticRef("INSTANCE");
            }

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.