Java Doc for JClass.java in  » 6.0-JDK-Modules » jaxb-xjc » com » sun » codemodel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jaxb xjc » com.sun.codemodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.codemodel.JType
      com.sun.codemodel.JClass

All known Subclasses:   com.sun.codemodel.JTypeWildcard,  com.sun.codemodel.JArrayClass,  com.sun.codemodel.JTypeVar,  com.sun.codemodel.JDefinedClass,  com.sun.codemodel.JNullType,  com.sun.codemodel.JNarrowedClass,  com.sun.codemodel.JDirectClass,
JClass
abstract public class JClass extends JType (Code)
Represents a Java reference type, such as a class, an interface, an enum, an array type, a parameterized type.

To be exact, this object represents an "use" of a reference type, not necessarily a declaration of it, which is modeled as JDefinedClass .



Field Summary
final protected static  JTypeVar[]EMPTY_ARRAY
     Sometimes useful reusable empty array.

Constructor Summary
protected  JClass(JCodeModel _owner)
    

Method Summary
abstract public  JClass_extends()
     Gets the super class of this class.
abstract public  Iterator<JClass>_implements()
     Iterates all super interfaces directly implemented by this class/interface.
abstract public  JPackage_package()
     Gets the package to which this class belongs.
public  JClassarray()
    
public  JClassboxify()
    
final public  JExpressiondotclass()
    
public  JClasserasure()
    
public  voidgenerate(JFormatter f)
    
final public  JClassgetBaseClass(JClass baseType)
     Gets the parameterization of the given base type.
final public  JClassgetBaseClass(Class baseType)
    
public  JPrimitiveTypegetPrimitiveType()
     If this class represents one of the wrapper classes defined in the java.lang package, return the corresponding primitive type.
public  List<JClass>getTypeParameters()
     If this class is parameterized, return the type parameter of the given index.
abstract public  booleanisAbstract()
     Checks if this class is an abstract class.
final public  booleanisAssignableFrom(JClass derived)
     Checks the relationship between two classes.

This method works in the same way as Class.isAssignableFrom(Class) works.

abstract public  booleanisInterface()
     Checks if this object represents an interface.
final public  booleanisParameterized()
     Returns true if this class is a parameterized class.
abstract public  Stringname()
     Gets the name of this class.
public  JClassnarrow(Class clazz)
     "Narrows" a generic class to a concrete class by specifying a type argument.
public  JClassnarrow(Class... clazz)
    
public  JClassnarrow(JClass clazz)
     "Narrows" a generic class to a concrete class by specifying a type argument.
public  JClassnarrow(JClass... clazz)
    
public  JClassnarrow(List<? extends JClass> clazz)
    
public  JClassouter()
     Returns the class in which this class is nested, or null if this is a top-level class.
final public  JCodeModelowner()
     Gets the JCodeModel object to which this object belongs.
 voidprintLink(JFormatter f)
     Prints the class name in javadoc @link format.
final public  JInvocationstaticInvoke(JMethod method)
     Generates a static method invocation.
final public  JInvocationstaticInvoke(String method)
     Generates a static method invocation.
final public  JFieldRefstaticRef(String field)
     Static field reference.
final public  JFieldRefstaticRef(JVar field)
     Static field reference.
abstract protected  JClasssubstituteParams(JTypeVar[] variables, List<JClass> bindings)
     Substitutes the type variables with their actual arguments.
public  StringtoString()
    
public  JTypeVar[]typeParams()
     Iterates all the type parameters of this class/interface.
public  JTypeunboxify()
    
final public  JClasswildcard()
     Create "? extends T" from T.

Field Detail
EMPTY_ARRAY
final protected static JTypeVar[] EMPTY_ARRAY(Code)
Sometimes useful reusable empty array.




Constructor Detail
JClass
protected JClass(JCodeModel _owner)(Code)




Method Detail
_extends
abstract public JClass _extends()(Code)
Gets the super class of this class. Returns the JClass representing the superclass of theentity (class or interface) represented by this JClass.Even if no super class is given explicitly or this JClassis not a class, this method still returnsJClass for Object.If this JClass represents Object, return null.



_implements
abstract public Iterator<JClass> _implements()(Code)
Iterates all super interfaces directly implemented by this class/interface. A non-null valid iterator that iterates allJClass objects that represents those interfacesimplemented by this object.



_package
abstract public JPackage _package()(Code)
Gets the package to which this class belongs. TODO: shall we move move this down?



array
public JClass array()(Code)



boxify
public JClass boxify()(Code)
JClass



dotclass
final public JExpression dotclass()(Code)



erasure
public JClass erasure()(Code)



generate
public void generate(JFormatter f)(Code)



getBaseClass
final public JClass getBaseClass(JClass baseType)(Code)
Gets the parameterization of the given base type.

For example, given the following


 interface Foo<T> extends List<List<T>> {}
 interface Bar extends Foo<String> {}
 
This method works like this:

 getBaseClass( Bar, List ) = List<List<String>
 getBaseClass( Bar, Foo  ) = Foo<String>
 getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
 getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
 

Parameters:
  baseType - The class whose parameterization we are interested in.The use of baseType in this type.or null if the type is not assignable to the base type.



getBaseClass
final public JClass getBaseClass(Class baseType)(Code)



getPrimitiveType
public JPrimitiveType getPrimitiveType()(Code)
If this class represents one of the wrapper classes defined in the java.lang package, return the corresponding primitive type. Otherwise null.



getTypeParameters
public List<JClass> getTypeParameters()(Code)
If this class is parameterized, return the type parameter of the given index.



isAbstract
abstract public boolean isAbstract()(Code)
Checks if this class is an abstract class.



isAssignableFrom
final public boolean isAssignableFrom(JClass derived)(Code)
Checks the relationship between two classes.

This method works in the same way as Class.isAssignableFrom(Class) works. For example, baseClass.isAssignableFrom(derivedClass)==true.




isInterface
abstract public boolean isInterface()(Code)
Checks if this object represents an interface.



isParameterized
final public boolean isParameterized()(Code)
Returns true if this class is a parameterized class.



name
abstract public String name()(Code)
Gets the name of this class. name of this class, without any qualification.For example, this method returns "String" forjava.lang.String.



narrow
public JClass narrow(Class clazz)(Code)
"Narrows" a generic class to a concrete class by specifying a type argument.

.narrow(X) builds Set<X> from Set.




narrow
public JClass narrow(Class... clazz)(Code)



narrow
public JClass narrow(JClass clazz)(Code)
"Narrows" a generic class to a concrete class by specifying a type argument.

.narrow(X) builds Set<X> from Set.




narrow
public JClass narrow(JClass... clazz)(Code)



narrow
public JClass narrow(List<? extends JClass> clazz)(Code)



outer
public JClass outer()(Code)
Returns the class in which this class is nested, or null if this is a top-level class.



owner
final public JCodeModel owner()(Code)
Gets the JCodeModel object to which this object belongs.



printLink
void printLink(JFormatter f)(Code)
Prints the class name in javadoc @link format.



staticInvoke
final public JInvocation staticInvoke(JMethod method)(Code)
Generates a static method invocation.



staticInvoke
final public JInvocation staticInvoke(String method)(Code)
Generates a static method invocation.



staticRef
final public JFieldRef staticRef(String field)(Code)
Static field reference.



staticRef
final public JFieldRef staticRef(JVar field)(Code)
Static field reference.



substituteParams
abstract protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings)(Code)
Substitutes the type variables with their actual arguments.

For example, when this class is Map<String,Map<V>>, (where V then doing substituteParams( V, Integer ) returns a JClass for Map<String,Map<Integer>>.

This method needs to work recursively.




toString
public String toString()(Code)



typeParams
public JTypeVar[] typeParams()(Code)
Iterates all the type parameters of this class/interface.

For example, if this JClass represents Set<T>, this method returns an array that contains single JTypeVar for 'T'.




unboxify
public JType unboxify()(Code)



wildcard
final public JClass wildcard()(Code)
Create "? extends T" from T. never null



Methods inherited from com.sun.codemodel.JType
abstract public JClass array()(Code)(Java Doc)
public String binaryName()(Code)(Java Doc)
abstract public JClass boxify()(Code)(Java Doc)
public int compareTo(Object o)(Code)(Java Doc)
public JType elementType()(Code)(Java Doc)
public JType erasure()(Code)(Java Doc)
abstract public String fullName()(Code)(Java Doc)
public boolean isArray()(Code)(Java Doc)
public boolean isPrimitive()(Code)(Java Doc)
final public boolean isReference()(Code)(Java Doc)
abstract public String name()(Code)(Java Doc)
abstract public JCodeModel owner()(Code)(Java Doc)
public static JPrimitiveType parse(JCodeModel codeModel, String typeName)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
abstract public JType unboxify()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.