Package com.sun.codemodel

Examples of com.sun.codemodel.JCodeModel.ref()


                cm.SHORT,
                cm.SHORT.boxify(),
                cm.SHORT.array(),
                cm.SHORT.boxify().array(),
                cm.ref( String.class ),
                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
View Full Code Here


                cm.SHORT.boxify(),
                cm.SHORT.array(),
                cm.SHORT.boxify().array(),
                cm.ref( String.class ),
                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
View Full Code Here

                cm.SHORT.array(),
                cm.SHORT.boxify().array(),
                cm.ref( String.class ),
                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
            };
View Full Code Here

                cm.SHORT.boxify().array(),
                cm.ref( String.class ),
                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
            };
    }
View Full Code Here

                cm.ref( String.class ),
                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
            };
    }
View Full Code Here

                cm.ref( BigInteger.class ),
                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
            };
    }

    private boolean isBasicFieldOutline( final FieldOutline f )
View Full Code Here

                cm.ref( BigDecimal.class ),
                cm.ref( java.util.Date.class ),
                cm.ref( java.util.Calendar.class ),
                cm.ref( java.sql.Date.class ),
                cm.ref( java.sql.Time.class ),
                cm.ref( java.sql.Timestamp.class )
            };
    }

    private boolean isBasicFieldOutline( final FieldOutline f )
    {
View Full Code Here

        parent.elements.put(ei,this);

        JCodeModel cm = parent.getCodeModel();

        implClass._extends(
            cm.ref(JAXBElement.class).narrow(
                target.getContentInMemoryType().toType(parent,Aspect.EXPOSED).boxify()));

        if(ei.hasClass()) {
            JType implType = ei.getContentInMemoryType().toType(parent,Aspect.IMPLEMENTATION);
            JExpression declaredType = JExpr.cast(cm.ref(Class.class),implType.boxify().dotclass()); // why do we have to cast?
View Full Code Here

            cm.ref(JAXBElement.class).narrow(
                target.getContentInMemoryType().toType(parent,Aspect.EXPOSED).boxify()));

        if(ei.hasClass()) {
            JType implType = ei.getContentInMemoryType().toType(parent,Aspect.IMPLEMENTATION);
            JExpression declaredType = JExpr.cast(cm.ref(Class.class),implType.boxify().dotclass()); // why do we have to cast?
            JClass scope=null;
            if(ei.getScope()!=null)
                scope = parent.getClazz(ei.getScope()).implRef;
            JExpression scopeClass = scope==null?JExpr._null():scope.dotclass();
            JFieldVar valField = implClass.field(JMod.PROTECTED|JMod.FINAL|JMod.STATIC,QName.class,"NAME",createQName(cm,ei.getElementName()));
View Full Code Here

                else
                    eq = fe.var().ref($value).invoke("equals").arg($v);

                fe.body()._if(eq)._then()._return(fe.var());

                JInvocation ex = JExpr._new(codeModel.ref(IllegalArgumentException.class));

                JExpression strForm;
                if(baseExposedType.isPrimitive()) {
                    strForm = codeModel.ref(String.class).staticInvoke("valueOf").arg($v);
                } else
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.