Java Doc for Type.java in  » Scripting » Kawa » gnu » bytecode » 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 » Scripting » Kawa » gnu.bytecode 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.bytecode.Type

All known Subclasses:   gnu.bytecode.PrimType,  gnu.bytecode.ObjectType,  gnu.kawa.xml.XDataType,
Type
abstract public class Type (Code)


Field Summary
 ArrayTypearray_type
    
final public static  MethodbooleanValue_method
    
final public static  ClassTypeboolean_ctype
    
final public static  PrimTypeboolean_type
    
final public static  PrimTypebyte_type
    
final public static  PrimTypechar_type
    
final public static  Methodclone_method
    
final public static  MethoddoubleValue_method
    
final public static  PrimTypedouble_type
    
final public static  MethodfloatValue_method
    
final public static  PrimTypefloat_type
    
final public static  MethodintValue_method
    
final public static  PrimTypeint_type
    
final public static  ClassTypejava_lang_Class_type
    
final public static  MethodlongValue_method
    
final public static  PrimTypelong_type
    
static  WeakHashMapmapClassToType
    
static  java.util.HashtablemapNameToType
     Maps Java type name (e.g.
final public static  PrimTypeneverReturnsType
     The "return type" of an expression that never returns, such as a throw.
final public static  ObjectTypenullType
     The magic type of null.
final public static  ClassTypenumber_type
    
final public static  ClassTypepointer_type
    
protected  ClassreflectClass
    
final public static  PrimTypeshort_type
    
 Stringsignature
    
 intsize
     Nominal unpromoted size in bytes.
public static  ClassTypestring_type
    
 Stringthis_name
    
final public static  ClassTypethrowable_type
    
final public static  MethodtoString_method
    
final public static  ClassTypetostring_type
    
final public static  Type[]typeArray0
    
final public static  PrimTypevoid_type
    

Constructor Summary
protected  Type()
    
 Type(String nam, String sig)
    
public  Type(Type type)
    

Method Summary
abstract public  ObjectcoerceFromObject(Object obj)
     Convert an object to a value of this Type. Throw a ClassCastException when this is not possible.
public  ObjectcoerceToObject(Object obj)
    
abstract public  intcompare(Type other)
     Return a numeric code showing "subtype" relationship: 1: if other is a pure subtype of this; 0: if has the same values; -1: if this is a pure subtype of other; -2: if they have values in common but neither is a subtype of the other; -3: if the types have no values in common. "Same member" is rather loose; by "A is a subtype of B" we mean that all instance of A can be "widened" to B. More formally, A.compare(B) returns: 1: all B values can be converted to A without a coercion failure (i.e.
public  voidemitCoerceFromObject(CodeAttr code)
     Compile code to coerce/convert from Object to this type.
public  voidemitCoerceToObject(CodeAttr code)
     Compile code to convert a object of this type on the stack to Object.
public  voidemitIsInstance(CodeAttr code)
    
public  TypegetImplementationType()
     The type used to implement types not natively understood by the JVM. Usually, the identity function.
final public  StringgetName()
    
public  java.lang.ClassgetReflectClass()
     Get the java.lang.Class object for the representation type.
final public  StringgetSignature()
    
final public  intgetSize()
    
public  intgetSizeInWords()
    
public static  TypegetType(String name)
     Find an Type with the given name, or create a new one. Use this for "library classes", where you need the field/method types, but not one where you are about to generate code for.
Parameters:
  name - the name of the class (e..g.
public  inthashCode()
    
public  booleanisInstance(Object obj)
    
public static  booleanisMoreSpecific(Type[] t1, Type[] t2)
     Return true iff t1[i].isSubtype(t2[i]) for all i.
final public  booleanisSubtype(Type other)
     Return true if this is a "subtype" of other.
public static  booleanisValidJavaTypeName(String name)
    
final public  booleanisVoid()
    
public static  TypelookupType(String name)
    
public static  TypelowestCommonSuperType(Type t1, Type t2)
     Computes the common supertype Interfaces are not taken into account.
public static synchronized  Typemake(Class reflectClass)
    
public  Typepromote()
    
public static synchronized  voidregisterTypeForClass(Class clas, Type type)
     Register that the Type for class is type.
protected  voidsetName(String name)
    
public  voidsetReflectClass(java.lang.Class rclass)
    
protected  voidsetSignature(String sig)
    
public static  intsignatureLength(String sig, int pos)
     Return the length of the signature starting at a given string position. Returns -1 for an invalid signature.
public static  intsignatureLength(String sig)
    
public static  StringsignatureToName(String sig)
     Returns the Java-level type name from a given signature. Returns null for an invalid signature.
public static  PrimTypesignatureToPrimitive(char sig)
     Returns the primitive type corresponding to a signature character. a primitive type, or null if there is no such type.
public static  TypesignatureToType(String sig, int off, int len)
     Get a Type corresponding to the given signature string.
public static  TypesignatureToType(String sig)
     Get a Type corresponding to the given signature string.
protected static  intswappedCompareResult(int code)
     Change result from compare to compensate for argument swapping.
public  StringtoString()
    

Field Detail
array_type
ArrayType array_type(Code)



booleanValue_method
final public static Method booleanValue_method(Code)



boolean_ctype
final public static ClassType boolean_ctype(Code)



boolean_type
final public static PrimType boolean_type(Code)



byte_type
final public static PrimType byte_type(Code)



char_type
final public static PrimType char_type(Code)



clone_method
final public static Method clone_method(Code)



doubleValue_method
final public static Method doubleValue_method(Code)



double_type
final public static PrimType double_type(Code)



floatValue_method
final public static Method floatValue_method(Code)



float_type
final public static PrimType float_type(Code)



intValue_method
final public static Method intValue_method(Code)



int_type
final public static PrimType int_type(Code)



java_lang_Class_type
final public static ClassType java_lang_Class_type(Code)



longValue_method
final public static Method longValue_method(Code)



long_type
final public static PrimType long_type(Code)



mapClassToType
static WeakHashMap mapClassToType(Code)



mapNameToType
static java.util.Hashtable mapNameToType(Code)
Maps Java type name (e.g. "java.lang.String[]") to corresponding Type.



neverReturnsType
final public static PrimType neverReturnsType(Code)
The "return type" of an expression that never returns, such as a throw.



nullType
final public static ObjectType nullType(Code)
The magic type of null.



number_type
final public static ClassType number_type(Code)



pointer_type
final public static ClassType pointer_type(Code)



reflectClass
protected Class reflectClass(Code)



short_type
final public static PrimType short_type(Code)



signature
String signature(Code)



size
int size(Code)
Nominal unpromoted size in bytes.



string_type
public static ClassType string_type(Code)



this_name
String this_name(Code)



throwable_type
final public static ClassType throwable_type(Code)



toString_method
final public static Method toString_method(Code)



tostring_type
final public static ClassType tostring_type(Code)



typeArray0
final public static Type[] typeArray0(Code)



void_type
final public static PrimType void_type(Code)




Constructor Detail
Type
protected Type()(Code)



Type
Type(String nam, String sig)(Code)



Type
public Type(Type type)(Code)




Method Detail
coerceFromObject
abstract public Object coerceFromObject(Object obj)(Code)
Convert an object to a value of this Type. Throw a ClassCastException when this is not possible.



coerceToObject
public Object coerceToObject(Object obj)(Code)



compare
abstract public int compare(Type other)(Code)
Return a numeric code showing "subtype" relationship: 1: if other is a pure subtype of this; 0: if has the same values; -1: if this is a pure subtype of other; -2: if they have values in common but neither is a subtype of the other; -3: if the types have no values in common. "Same member" is rather loose; by "A is a subtype of B" we mean that all instance of A can be "widened" to B. More formally, A.compare(B) returns: 1: all B values can be converted to A without a coercion failure (i.e. a ClassCastException or overflow or major loss of information), but not vice versa. 0: all A values can be converted to B without a coercion failure and vice versa; -1: all A values can be converted to B without a coercion failure not not vice versa; -2: there are (potentially) some A values that can be converted to B, and some B values can be converted to A; -3: there are no A values that can be converted to B, and neither are there any B values that can be converted to A.



emitCoerceFromObject
public void emitCoerceFromObject(CodeAttr code)(Code)
Compile code to coerce/convert from Object to this type.



emitCoerceToObject
public void emitCoerceToObject(CodeAttr code)(Code)
Compile code to convert a object of this type on the stack to Object.



emitIsInstance
public void emitIsInstance(CodeAttr code)(Code)



getImplementationType
public Type getImplementationType()(Code)
The type used to implement types not natively understood by the JVM. Usually, the identity function. However, a language might handle union types or template types or type expressions calculated at run time. In that case return the type used at the JVM level, and known at compile time.



getName
final public String getName()(Code)



getReflectClass
public java.lang.Class getReflectClass()(Code)
Get the java.lang.Class object for the representation type.



getSignature
final public String getSignature()(Code)



getSize
final public int getSize()(Code)



getSizeInWords
public int getSizeInWords()(Code)



getType
public static Type getType(String name)(Code)
Find an Type with the given name, or create a new one. Use this for "library classes", where you need the field/method types, but not one where you are about to generate code for.
Parameters:
  name - the name of the class (e..g. "java.lang.String").



hashCode
public int hashCode()(Code)



isInstance
public boolean isInstance(Object obj)(Code)



isMoreSpecific
public static boolean isMoreSpecific(Type[] t1, Type[] t2)(Code)
Return true iff t1[i].isSubtype(t2[i]) for all i.



isSubtype
final public boolean isSubtype(Type other)(Code)
Return true if this is a "subtype" of other.



isValidJavaTypeName
public static boolean isValidJavaTypeName(String name)(Code)



isVoid
final public boolean isVoid()(Code)



lookupType
public static Type lookupType(String name)(Code)



lowestCommonSuperType
public static Type lowestCommonSuperType(Type t1, Type t2)(Code)
Computes the common supertype Interfaces are not taken into account. This would be difficult, since interfaces allow multiple-inheritance. This means that there may exists multiple common supertypes to t1 and t2 that are not comparable. the lowest type that is both above t1 and t2,or null if t1 and t2 have no common supertype.



make
public static synchronized Type make(Class reflectClass)(Code)



promote
public Type promote()(Code)



registerTypeForClass
public static synchronized void registerTypeForClass(Class clas, Type type)(Code)
Register that the Type for class is type.



setName
protected void setName(String name)(Code)



setReflectClass
public void setReflectClass(java.lang.Class rclass)(Code)



setSignature
protected void setSignature(String sig)(Code)



signatureLength
public static int signatureLength(String sig, int pos)(Code)
Return the length of the signature starting at a given string position. Returns -1 for an invalid signature.



signatureLength
public static int signatureLength(String sig)(Code)



signatureToName
public static String signatureToName(String sig)(Code)
Returns the Java-level type name from a given signature. Returns null for an invalid signature.



signatureToPrimitive
public static PrimType signatureToPrimitive(char sig)(Code)
Returns the primitive type corresponding to a signature character. a primitive type, or null if there is no such type.



signatureToType
public static Type signatureToType(String sig, int off, int len)(Code)
Get a Type corresponding to the given signature string.



signatureToType
public static Type signatureToType(String sig)(Code)
Get a Type corresponding to the given signature string.



swappedCompareResult
protected static int swappedCompareResult(int code)(Code)
Change result from compare to compensate for argument swapping.



toString
public String toString()(Code)



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.