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


java.lang.Object
   gnu.bytecode.Type

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


Field Summary
public static  MethodbooleanValue_method
    
public static  ClassTypeboolean_ctype
    
final public static  PrimTypeboolean_type
    
public static  ClassTypebyte_ctype
    
final public static  PrimTypebyte_type
    
public static  MethodcharValue_method
    
public static  ClassTypechar_ctype
    
final public static  PrimTypechar_type
    
public static  ClassTypecharacter_type
    
public  booleancollectable
    
public static  MethoddoubleValue_method
    
public static  ClassTypedouble_ctype
    
final public static  PrimTypedouble_type
    
public static  MethodfloatValue_method
    
public static  ClassTypefloat_ctype
    
final public static  PrimTypefloat_type
    
public static  MethodintValue_method
    
public static  ClassTypeint_ctype
    
final public static  PrimTypeint_type
    
public static  MethodlongValue_method
    
public static  ClassTypelong_ctype
    
final public static  PrimTypelong_type
    
static  java.util.HashtablemapNameToType
     Maps Java type name (e.g.
final public static  PrimTypeneverReturnsType
     The "return type" of an expression that never returns, e.g.
final public static  ObjectTypenullType
     The magic type of null.
public static  ClassTypenumber_type
    
public static  ClassTypepointer_type
    
protected  ClassreflectClass
    
public static  ClassTypeshort_ctype
    
final public static  PrimTypeshort_type
    
 Stringsignature
    
 intsize
     Nominal unpromoted size in bytes.
public static  ClassTypestring_type
    
 Stringthis_name
    
public static  ClassTypethrowable_type
    
public static  MethodtoString_method
    
public static  ClassTypetostring_type
    
public static  Type[]typeArray0
    
final public static  PrimTypevoid_type
    

Constructor Summary
 Type()
    
 Type(String nam, String sig)
    

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  voidemitCoerceFrom(Type fromType, CodeAttr code)
     Compile code to convert an object (on the stack) of that Type to this Type.
public  voidemitCoerceFromObject(CodeAttr code)
     Compile code to coerce/convert from Object to this type.
public  voidemitCoerceTo(Type toType, CodeAttr code)
     Compile code to convert an object (on the stack) of this Type to toType.
public  voidemitCoerceToObject(CodeAttr code)
     Compile code to convert a object of this type on the stack to Object.
public  voidemitIsInstance(CodeAttr code)
    
public static  voidflushTypeChanges()
    
public static  voidfree(java.util.Map t)
    
public static  TypefullSignatureToType(String sig, int[] offset)
     Get a Type corresponding to the given full signature string starting from offset[0].
public  TypegetImplementationType()
     The type used to implement types not natively understood by the JVM. Usually, the identity function.
static  java.util.HashtablegetMapNameToType()
    
public  StringgetName()
    
public  java.lang.ClassgetReflectClass()
     Get the java.lang.Class object for the representation type.
final public  StringgetSignature()
    
final public  intgetSize()
    
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  booleanisArray()
    
abstract public  booleanisAssignableTo(Type other)
    
public  booleanisInstance(Object obj)
    
public static  booleanisMoreSpecific(Type[] t1, Type[] t2)
     Return true iff t1[i].isSubtype(t2[i]) for all i.
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  Typemake(Class reflectClass)
    
public  Typepromote()
    
 MethodrefineMethod(Method method)
     Return an equivalent method when the receiver is of this type.
public static  voidregisterTypeForClass(Class clas, Type type)
     Register that the Type for class is type.
public static  voidregisterTypeForName(String name, Type type)
     Register that the Type for class is type.
public static  voidreset()
    
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
booleanValue_method
public static Method booleanValue_method(Code)



boolean_ctype
public static ClassType boolean_ctype(Code)



boolean_type
final public static PrimType boolean_type(Code)



byte_ctype
public static ClassType byte_ctype(Code)



byte_type
final public static PrimType byte_type(Code)



charValue_method
public static Method charValue_method(Code)



char_ctype
public static ClassType char_ctype(Code)



char_type
final public static PrimType char_type(Code)



character_type
public static ClassType character_type(Code)



collectable
public boolean collectable(Code)



doubleValue_method
public static Method doubleValue_method(Code)



double_ctype
public static ClassType double_ctype(Code)



double_type
final public static PrimType double_type(Code)



floatValue_method
public static Method floatValue_method(Code)



float_ctype
public static ClassType float_ctype(Code)



float_type
final public static PrimType float_type(Code)



intValue_method
public static Method intValue_method(Code)



int_ctype
public static ClassType int_ctype(Code)



int_type
final public static PrimType int_type(Code)



longValue_method
public static Method longValue_method(Code)



long_ctype
public static ClassType long_ctype(Code)



long_type
final public static PrimType long_type(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, e.g. a throw.



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



number_type
public static ClassType number_type(Code)



pointer_type
public static ClassType pointer_type(Code)



reflectClass
protected Class reflectClass(Code)



short_ctype
public static ClassType short_ctype(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
public static ClassType throwable_type(Code)



toString_method
public static Method toString_method(Code)



tostring_type
public static ClassType tostring_type(Code)



typeArray0
public static Type[] typeArray0(Code)



void_type
final public static PrimType void_type(Code)




Constructor Detail
Type
Type()(Code)



Type
Type(String nam, String sig)(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.



emitCoerceFrom
public void emitCoerceFrom(Type fromType, CodeAttr code)(Code)
Compile code to convert an object (on the stack) of that Type to this Type.



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



emitCoerceTo
public void emitCoerceTo(Type toType, CodeAttr code)(Code)
Compile code to convert an object (on the stack) of this Type to toType.



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)



flushTypeChanges
public static void flushTypeChanges()(Code)



free
public static void free(java.util.Map t)(Code)



fullSignatureToType
public static Type fullSignatureToType(String sig, int[] offset)(Code)
Get a Type corresponding to the given full signature string starting from offset[0]. Set offset[0] to the end index of the signature.



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 expression scalculated at run time. In that case return the type used at the JVM level, and known at compile time.



getMapNameToType
static java.util.Hashtable getMapNameToType()(Code)



getName
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)



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").



isArray
public boolean isArray()(Code)



isAssignableTo
abstract public boolean isAssignableTo(Type other)(Code)
true if values of this type can be assigned to otherwithout widening nor conversion.



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
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 Type make(Class reflectClass)(Code)



promote
public Type promote()(Code)



refineMethod
Method refineMethod(Method method)(Code)
Return an equivalent method when the receiver is of this type. Return null if no more precise method exists.



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



registerTypeForName
public static void registerTypeForName(String name, Type type)(Code)
Register that the Type for class is type.



reset
public static void reset()(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.