Uses of Class
com.sun.codemodel.JType
-
Packages that use JType Package Description com.sun.codemodel Library for generating Java source codecom.sun.codemodel.fmt -
-
Uses of JType in com.sun.codemodel
Subclasses of JType in com.sun.codemodel Modifier and Type Class Description (package private) classJAnonymousClassAnonymous class quick hack.(package private) classJArrayClassArray class.classJClassRepresents a Java reference type, such as a class, an interface, an enum, an array type, a parameterized type.private classJCodeModel.JReferencedClassReferences to existing classes.classJDefinedClassA generated Java class/interface/enum/....(package private) classJDirectClassA specialJClassthat represents an unknown class (except its name.)(package private) classJNarrowedClassRepresents X<Y>.classJNullTypeSpecial class object that represents the type of "null".classJPrimitiveTypeJava built-in primitive types.classJTypeVarType variable used to declare generics.(package private) classJTypeWildcardRepresents a wildcard type like "? extends Foo".Fields in com.sun.codemodel declared as JType Modifier and Type Field Description private JTypeJArrayClass. componentTypeprivate JTypeJArray. typeprivate JTypeJCast. typeJType to which the expression is to be cast.private JTypeJForEach. typeprivate JTypeJInvocation. typeIf isConstructor==true, this field keeps the type to be created.private JTypeJMethod. typeReturn type for this methodprivate JTypeJVar. typeJType of the variableMethods in com.sun.codemodel that return JType Modifier and Type Method Description JTypeJCodeModel. _ref(java.lang.Class<?> c)JTypeJArrayClass. elementType()JTypeJType. elementType()If this is an array, returns the component type of the array.JTypeJType. erasure()Returns the erasure of this type.JType[]JMethod. listParamTypes()Returns all the parameter types in an array.JTypeJMethod. listVarParamType()Returns the varags parameter type.JTypeJCodeModel. parseType(java.lang.String name)Obtains a type object from a type name.JTypeJMethod. type()Returns the return type.JTypeJVar. type()Return the type of this variable.JTypeJVar. type(JType newType)Sets the type of this variable.JTypeJClass. unboxify()JTypeJPrimitiveType. unboxify()Deprecated.calling this method fromJPrimitiveTypewould be meaningless, since it's always guaranteed to return this.abstract JTypeJType. unboxify()If this class is a wrapper type for a primitive, return the primitive type.Methods in com.sun.codemodel with parameters of type JType Modifier and Type Method Description JExpressionJExpression. _instanceof(JType right)Returns "[this] instanceof [right]"JExpressionJExpressionImpl. _instanceof(JType right)static JExpressionJOp. _instanceof(JExpression left, JType right)static JInvocationJExpr. _new(JType t)static JCastJExpr. cast(JType type, JExpression expr)intJType. compareTo(JType o)Compare two JTypes by FQCN, giving sorting precedence to types that belong to packages java and javax over all others.JVarJBlock. decl(int mods, JType type, java.lang.String name, JExpression init)Adds a local variable declaration to this blockJVarJBlock. decl(JType type, java.lang.String name)Adds a local variable declaration to this blockJVarJBlock. decl(JType type, java.lang.String name, JExpression init)Adds a local variable declaration to this blockJFieldVarJDefinedClass. field(int mods, JType type, java.lang.String name)Adds a field to the list of field members of this JDefinedClass.JFieldVarJDefinedClass. field(int mods, JType type, java.lang.String name, JExpression init)Adds a field to the list of field members of this JDefinedClass.JForEachJBlock. forEach(JType varType, java.lang.String name, JExpression collection)Creates an enhanced For statement based on j2se 1.5 JLS and add it to this blockJMethodJDefinedClass. getConstructor(JType[] argTypes)Looks for a method that has the specified method signature and return it.JMethodJDefinedClass. getMethod(java.lang.String name, JType[] argTypes)Looks for a method that has the specified method signature and return it.booleanJMethod. hasSignature(JType[] argTypes)Returns true if the method has the specified signature.JVarJForLoop. init(int mods, JType type, java.lang.String var, JExpression e)JVarJForLoop. init(JType type, java.lang.String var, JExpression e)JMethodJDefinedClass. method(int mods, JType type, java.lang.String name)Add a method to the list of method members of this JDefinedClass instance.JClassJClass. narrow(JType type)static JArrayJExpr. newArray(JType type)static JArrayJExpr. newArray(JType type, int size)Generatesnew T[size].static JArrayJExpr. newArray(JType type, JExpression size)Generatesnew T[size].JAnnotationArrayMemberJAnnotationArrayMember. param(JType type)JAnnotationUseJAnnotationUse. param(java.lang.String name, JType type)Adds a member value pair to this annotation based on the type represented by the given JTypeJVarJMethod. param(int mods, JType type, java.lang.String name)Add the specified variable to the list of parameters for this method signature.JVarJMethod. param(JType type, java.lang.String name)JFormatterJFormatter. t(JType type)voidJMethod. type(JType t)Overrides the return type.JTypeJVar. type(JType newType)Sets the type of this variable.JVarJMethod. varParam(JType type, java.lang.String name)Add the specified variable argument to the list of parameters for this method signature.Constructors in com.sun.codemodel with parameters of type JType Constructor Description JArray(JType type, JExpression size)JArrayClass(JCodeModel owner, JType component)JCast(JType type, JExpression object)JCast constructorJFieldRef(JType type, JVar v)JFieldRef(JType type, java.lang.String name)Static field reference.JFieldVar(JDefinedClass owner, JMods mods, JType type, java.lang.String name, JExpression init)JFieldVar constructorJForEach(JType vartype, java.lang.String variable, JExpression collection)JInvocation(JType c)Invokes a constructor of an object (i.e., creates a new object.)JMethod(JDefinedClass outer, int mods, JType type, java.lang.String name)JMethod constructorJVar(JMods mods, JType type, java.lang.String name, JExpression init)JVar constructor -
Uses of JType in com.sun.codemodel.fmt
Subclasses of JType in com.sun.codemodel.fmt Modifier and Type Class Description private classJStaticJavaFile.JStaticClass
-