Java Doc for ObjectAccessor.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » misc » accessors » 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 » Apache Harmony Java SE » org package » org.apache.harmony.misc.accessors 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.misc.accessors.ObjectAccessor

ObjectAccessor
public class ObjectAccessor (Code)
Provides the direct access to classes and objects. This class allows to overcome the certain limitations of the reflection API, such as setting the constant fields or allocating objects without calling its constructor. The following groups of operations are supported:
  • getField/MethodID,getStaticField/MethodID - used to get ID for methods and fields.
  • getXXX/setXXX - used to read and write non-static fields in objects (XXX stands for a field type);
  • getStaticXXX/setStaticXXX - used to read and write static fields in classes (XXX stands for a field type);
  • invokeStaticXXX - used to call static methods in a class (XXX means return type);
  • invokeVirtualXXX - used to call virtual methods for object (XXX means return type);
  • invokeNonVirtualXXX - used to call non-virtual methods for the given class and object (XXX means return type);
  • allocateObject, newInstance - provides a fine control over object construction;
  • hasStaticInitializer - informational methods about class;
  • monitorEnter/Exit - enter/exit monitor associated with the given object
Fields and methods are identified in the class with help of ID's those actual meaning is implementation dependent. Depending on a platform, ID's may represent the real offets in the physical memory, though it is not always guaranteed. Unlike the ArrayAccessor class, users should not rely on any correspondence between ID's and memory address space. However, it is guaranteed that ID's, once obtained, are valid during the whole lifetime of the given class and can equally be applied for all its instances.

No security checks are made while reading and writing object's fields, as well as while calling object's methods. In addition to variables, this class also allows to set the values for constant fields within an object.

For accessing Array objects, please use the ArrayAccessor class.
See Also:   ArrayAccessor





Method Summary
final native public  ObjectallocateObject(Class c)
     Allocates new object of the given class without calling its constructor. Constructor can be called independently with help of ObjectAccessor.invokeNonVirtualVoid(Class,Object,long,Object[]) method.
Parameters:
  c - A class those object needs to be allocated.
final native public  booleangetBoolean(Object o, long fieldID)
     Reads a boolean field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  bytegetByte(Object o, long fieldID)
     Reads a byte field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  chargetChar(Object o, long fieldID)
     Reads a char field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  doublegetDouble(Object o, long fieldID)
     Reads a double field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final public  longgetFieldID(Class c, String name)
     Returns the ID for a field with the given name.
final public  longgetFieldID(Class c, String name, Class type)
     Returns the ID for a field with the given name and type.
final native public  longgetFieldID(Field f)
     Returns the ID for the reflected field.
final native public  floatgetFloat(Object o, long fieldID)
     Reads a float field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  longgetGlobalReference(Object o)
    
static  ObjectAccessorgetInstance()
    
final native public  intgetInt(Object o, long fieldID)
     Reads a int field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  longgetLong(Object o, long fieldID)
     Reads a long field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final public  longgetMethodID(Class c, String name, Class[] parameterTypes)
     Returns the ID for the specified method or constructor. Use class constants for primitive parameter types.
final public  longgetMethodID(Constructor c)
     Returns the ID for the reflected constructor.
final public  longgetMethodID(Method m)
     Returns the ID for the reflected method.
final native public  ObjectgetObject(Object o, long fieldID)
     Reads an Object field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  ObjectgetObjectFromReference(long ref)
    
final native public  shortgetShort(Object o, long fieldID)
     Reads a short field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  booleangetStaticBoolean(Class c, long fieldID)
     Reads a boolean field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  bytegetStaticByte(Class c, long fieldID)
     Reads a byte field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  chargetStaticChar(Class c, long fieldID)
     Reads a char field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  doublegetStaticDouble(Class c, long fieldID)
     Reads a double field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final public  longgetStaticFieldID(Class c, String name)
     Returns the ID for the static field with the given name.
final public  longgetStaticFieldID(Class c, String name, Class type)
     Returns the ID for the static field with the given name and type.
final public  longgetStaticFieldID(Field f)
     Returns the ID for the reflected static field.
final native public  floatgetStaticFloat(Class c, long fieldID)
     Reads a float field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  intgetStaticInt(Class c, long fieldID)
     Reads a int field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  longgetStaticLong(Class c, long fieldID)
     Reads a long field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final public  longgetStaticMethodID(Class c, String name, Class[] parameterTypes)
     Returns the ID for the specified static method. Use class constants for primitive parameter types.
final native public  ObjectgetStaticObject(Class c, long fieldID)
     Reads an Object field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  shortgetStaticShort(Class c, long fieldID)
     Reads a short field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID.
final native public  booleanhasStaticInitializer(Class c)
     Determines whether the class c has static initializer.
final native public  longinvokeNonVirtualLong(Class c, Object obj, long methodID, Object[] args)
     Invokes a non-virtual long method with the given ID without security check.
final native public  ObjectinvokeNonVirtualObject(Class c, Object obj, long methodID, Object[] args)
     Invokes a non-virtual reference-type method with the given ID without security check.
final native public  voidinvokeNonVirtualVoid(Class c, Object obj, long methodID, Object[] args)
     Invokes a non-virtual void method or constructor with the given ID without security check.
final native public  longinvokeStaticLong(Class c, long methodID, Object[] args)
     Invokes a static long method with the given ID without security check.
final native public  ObjectinvokeStaticObject(Class c, long methodID, Object[] args)
     Invokes a static reference-type method with the given ID without security check.
final native public  voidinvokeStaticVoid(Class c, long methodID, Object[] args)
     Invokes static void method with the given ID without security check.
final native public  longinvokeVirtualLong(Object obj, long methodID, Object[] args)
     Invokes long method with the given ID without security check.
final native public  ObjectinvokeVirtualObject(Object obj, long methodID, Object[] args)
     Invokes reference-type method with the given ID without security check.
final native public  voidinvokeVirtualVoid(Object obj, long methodID, Object[] args)
     Invokes void method or constructor with the given ID without security check.
native public  voidmonitorEnter(Object o)
     calls monitorEnter java bytecode command.
native public  voidmonitorExit(Object o)
     calls monitorExit java bytecode command.
final native public  ObjectnewInstance(Class c, long methodID, Object[] args)
     Allocates new object of class c and invokes its constructor with the given ID and args without security checks.
final native public  ObjectnewInstance(Class c)
     Allocates new object of a class c and invokes noarg constructor without security check.
final native public  voidreleaseGlobalReference(long ref)
    
final native public  voidsetBoolean(Object o, long fieldID, boolean value)
     Writes a boolean field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetByte(Object o, long fieldID, byte value)
     Writes a byte field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetChar(Object o, long fieldID, char value)
     Writes a char field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetDouble(Object o, long fieldID, double value)
     Writes a double field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetFloat(Object o, long fieldID, float value)
     Writes a float field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetInt(Object o, long fieldID, int value)
     Writes a int field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetLong(Object o, long fieldID, long value)
     Writes a long field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetObject(Object o, long fieldID, Object value)
     Writes an Object field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetShort(Object o, long fieldID, short value)
     Writes a short field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class.
final native public  voidsetStaticBoolean(Class c, long fieldID, boolean value)
     Writes a boolean field for the given class.
final native public  voidsetStaticByte(Class c, long fieldID, byte value)
     Writes a byte field for the given class.
final native public  voidsetStaticChar(Class c, long fieldID, char value)
     Writes a char field for the given class.
final native public  voidsetStaticDouble(Class c, long fieldID, double value)
     Writes a double field for the given class.
final native public  voidsetStaticFloat(Class c, long fieldID, float value)
     Writes a float field for the given class.
final native public  voidsetStaticInt(Class c, long fieldID, int value)
     Writes a int field for the given class.
final native public  voidsetStaticLong(Class c, long fieldID, long value)
     Writes a long field for the given class.
final native public  voidsetStaticObject(Class c, long fieldID, Object value)
     Writes an Object field for the given class.
final native public  voidsetStaticShort(Class c, long fieldID, short value)
     Writes a short field for the given class.



Method Detail
allocateObject
final native public Object allocateObject(Class c)(Code)
Allocates new object of the given class without calling its constructor. Constructor can be called independently with help of ObjectAccessor.invokeNonVirtualVoid(Class,Object,long,Object[]) method.
Parameters:
  c - A class those object needs to be allocated. allocated object



getBoolean
final native public boolean getBoolean(Object o, long fieldID)(Code)
Reads a boolean field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. boolean field value
See Also:   ObjectAccessor.setBoolean(Object,long,boolean)



getByte
final native public byte getByte(Object o, long fieldID)(Code)
Reads a byte field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. byte field value
See Also:   ObjectAccessor.setByte(Object,long,byte)



getChar
final native public char getChar(Object o, long fieldID)(Code)
Reads a char field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. char field value
See Also:   ObjectAccessor.setChar(Object,long,char)



getDouble
final native public double getDouble(Object o, long fieldID)(Code)
Reads a double field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. double field value
See Also:   ObjectAccessor.setDouble(Object,long,double)



getFieldID
final public long getFieldID(Class c, String name)(Code)
Returns the ID for a field with the given name. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  c - class containing field
Parameters:
  name - field name field ID
throws:
  NoSuchFieldError - if the field could not be found



getFieldID
final public long getFieldID(Class c, String name, Class type)(Code)
Returns the ID for a field with the given name and type. This may be faster than getting the field using it's name only. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  c - class containing field
Parameters:
  name - field name
Parameters:
  type - field type field ID
throws:
  NoSuchFieldError - if the field could not be found



getFieldID
final native public long getFieldID(Field f)(Code)
Returns the ID for the reflected field.
Parameters:
  f - reflected field field ID



getFloat
final native public float getFloat(Object o, long fieldID)(Code)
Reads a float field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. float field value
See Also:   ObjectAccessor.setFloat(Object,long,float)



getGlobalReference
final native public long getGlobalReference(Object o)(Code)



getInstance
static ObjectAccessor getInstance()(Code)



getInt
final native public int getInt(Object o, long fieldID)(Code)
Reads a int field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. int field value
See Also:   ObjectAccessor.setInt(Object,long,int)



getLong
final native public long getLong(Object o, long fieldID)(Code)
Reads a long field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. long field value
See Also:   ObjectAccessor.setLong(Object,long,long)



getMethodID
final public long getMethodID(Class c, String name, Class[] parameterTypes)(Code)
Returns the ID for the specified method or constructor. Use class constants for primitive parameter types. For example, for byte type use the java.lang.Byte.TYPE class.
Parameters:
  c - a class the method belongs to
Parameters:
  name - method name or null in case of constructor
Parameters:
  parameterTypes - array of parameter types. method ID
throws:
  NoSuchMethodError - if the method could not be found
See Also:   ObjectAccessor.invokeVirtualVoid(Object,long,Object[])
See Also:   ObjectAccessor.invokeNonVirtualVoid(Class,Object,long,Object[])
See Also:   ObjectAccessor.newInstance(Class,long,Object[])



getMethodID
final public long getMethodID(Constructor c)(Code)
Returns the ID for the reflected constructor.
Parameters:
  c - reflected constructor method ID
See Also:   ObjectAccessor.invokeVirtualVoid(Object,long,Object[])
See Also:   ObjectAccessor.newInstance(Class,long,Object[])



getMethodID
final public long getMethodID(Method m)(Code)
Returns the ID for the reflected method.
Parameters:
  m - reflected method method ID
See Also:   ObjectAccessor.invokeVirtualVoid(Object,long,Object[])
See Also:   ObjectAccessor.invokeNonVirtualVoid(Class,Object,long,Object[])
See Also:   ObjectAccessor.invokeStaticVoid(Class,long,Object[])
See Also:   ObjectAccessor.newInstance(Class,long,Object[])



getObject
final native public Object getObject(Object o, long fieldID)(Code)
Reads an Object field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. Object field value
See Also:   ObjectAccessor.setObject(Object,long,Object)



getObjectFromReference
final native public Object getObjectFromReference(long ref)(Code)



getShort
final native public short getShort(Object o, long fieldID)(Code)
Reads a short field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be read
Parameters:
  fieldID - field ID. short field value
See Also:   ObjectAccessor.setShort(Object,long,short)



getStaticBoolean
final native public boolean getStaticBoolean(Class c, long fieldID)(Code)
Reads a boolean field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. boolean field value
See Also:   ObjectAccessor.setStaticBoolean(Class,long,boolean)



getStaticByte
final native public byte getStaticByte(Class c, long fieldID)(Code)
Reads a byte field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. byte field value
See Also:   ObjectAccessor.setStaticByte(Class,long,byte)



getStaticChar
final native public char getStaticChar(Class c, long fieldID)(Code)
Reads a char field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. char field value
See Also:   ObjectAccessor.setStaticChar(Class,long,char)



getStaticDouble
final native public double getStaticDouble(Class c, long fieldID)(Code)
Reads a double field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. double field value
See Also:   ObjectAccessor.setStaticDouble(Class,long,double)



getStaticFieldID
final public long getStaticFieldID(Class c, String name)(Code)
Returns the ID for the static field with the given name.
Parameters:
  c - class containing static field
Parameters:
  name - field name field ID
throws:
  NoSuchFieldError - if the field could not be found



getStaticFieldID
final public long getStaticFieldID(Class c, String name, Class type)(Code)
Returns the ID for the static field with the given name and type. This may be faster than getting the field using it's name only.
Parameters:
  c - class containing static field
Parameters:
  name - field name
Parameters:
  type - field type field ID
throws:
  NoSuchFieldError - if the field could not be found



getStaticFieldID
final public long getStaticFieldID(Field f)(Code)
Returns the ID for the reflected static field. Default implementation delegates to the ObjectAccessor.getFieldID(Field) call.
Parameters:
  f - reflected field field ID



getStaticFloat
final native public float getStaticFloat(Class c, long fieldID)(Code)
Reads a float field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. float field value
See Also:   ObjectAccessor.setStaticFloat(Class,long,float)



getStaticInt
final native public int getStaticInt(Class c, long fieldID)(Code)
Reads a int field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. int field value
See Also:   ObjectAccessor.setStaticInt(Class,long,int)



getStaticLong
final native public long getStaticLong(Class c, long fieldID)(Code)
Reads a long field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. long field value
See Also:   ObjectAccessor.setStaticLong(Class,long,long)



getStaticMethodID
final public long getStaticMethodID(Class c, String name, Class[] parameterTypes)(Code)
Returns the ID for the specified static method. Use class constants for primitive parameter types. For example, for byte type use the java.lang.Byte.TYPE class.
Parameters:
  c - a class the method belongs to
Parameters:
  name - method name or null in case of constructor
Parameters:
  parameterTypes - array of parameter types. static method ID
throws:
  NoSuchMethodError - if the method could not be found
See Also:   ObjectAccessor.invokeVirtualVoid(Object,long,Object[])



getStaticObject
final native public Object getStaticObject(Class c, long fieldID)(Code)
Reads an Object field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. Object field value
See Also:   ObjectAccessor.setStaticObject(Class,long,Object)



getStaticShort
final native public short getStaticShort(Class c, long fieldID)(Code)
Reads a short field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID. short field value
See Also:   ObjectAccessor.setStaticShort(Class,long,short)



hasStaticInitializer
final native public boolean hasStaticInitializer(Class c)(Code)
Determines whether the class c has static initializer. true if class c has static initializer, false otherwise



invokeNonVirtualLong
final native public long invokeNonVirtualLong(Class c, Object obj, long methodID, Object[] args)(Code)
Invokes a non-virtual long method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method or constructor is defined
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeNonVirtualObject
final native public Object invokeNonVirtualObject(Class c, Object obj, long methodID, Object[] args)(Code)
Invokes a non-virtual reference-type method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method or constructor is defined
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeNonVirtualVoid
final native public void invokeNonVirtualVoid(Class c, Object obj, long methodID, Object[] args)(Code)
Invokes a non-virtual void method or constructor with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method or constructor is defined
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeStaticLong
final native public long invokeStaticLong(Class c, long methodID, Object[] args)(Code)
Invokes a static long method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method is defined
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeStaticObject
final native public Object invokeStaticObject(Class c, long methodID, Object[] args)(Code)
Invokes a static reference-type method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method is defined
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeStaticVoid
final native public void invokeStaticVoid(Class c, long methodID, Object[] args)(Code)
Invokes static void method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  c - a class where method is defined
Parameters:
  methodID - method ID
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeVirtualLong
final native public long invokeVirtualLong(Object obj, long methodID, Object[] args)(Code)
Invokes long method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  methodID - method ID
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeVirtualObject
final native public Object invokeVirtualObject(Object obj, long methodID, Object[] args)(Code)
Invokes reference-type method with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  methodID - method ID
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



invokeVirtualVoid
final native public void invokeVirtualVoid(Object obj, long methodID, Object[] args)(Code)
Invokes void method or constructor with the given ID without security check. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the method ID.
Parameters:
  methodID - method ID
Parameters:
  obj - an object those method or constructor needs to be called
Parameters:
  args - array of arguments
See Also:   ObjectAccessor.getMethodID(Class,String,Class[])



monitorEnter
native public void monitorEnter(Object o)(Code)
calls monitorEnter java bytecode command. Acquire object o monitor
Parameters:
  o - object to lock



monitorExit
native public void monitorExit(Object o)(Code)
calls monitorExit java bytecode command. To free object o monitor
Parameters:
  o - object to unlock



newInstance
final native public Object newInstance(Class c, long methodID, Object[] args)(Code)
Allocates new object of class c and invokes its constructor with the given ID and args without security checks. Primitive type arguments should be wrapped with appropriate objects. For example, byte value should be wrapped with java.lang.Byte.TYPE . Use the ObjectAccessor.getMethodID(Class,String,Class[]) call to obtain the constructor ID.
Parameters:
  methodID - method ID
Parameters:
  c - class those instance needs to be created
Parameters:
  args - array of arguments allocated object



newInstance
final native public Object newInstance(Class c)(Code)
Allocates new object of a class c and invokes noarg constructor without security check.
Parameters:
  c - class those object needs to be created allocated object



releaseGlobalReference
final native public void releaseGlobalReference(long ref)(Code)



setBoolean
final native public void setBoolean(Object o, long fieldID, boolean value)(Code)
Writes a boolean field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getBoolean(Object,long)



setByte
final native public void setByte(Object o, long fieldID, byte value)(Code)
Writes a byte field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getByte(Object,long)



setChar
final native public void setChar(Object o, long fieldID, char value)(Code)
Writes a char field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getChar(Object,long)



setDouble
final native public void setDouble(Object o, long fieldID, double value)(Code)
Writes a double field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getDouble(Object,long)



setFloat
final native public void setFloat(Object o, long fieldID, float value)(Code)
Writes a float field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getFloat(Object,long)



setInt
final native public void setInt(Object o, long fieldID, int value)(Code)
Writes a int field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getInt(Object,long)



setLong
final native public void setLong(Object o, long fieldID, long value)(Code)
Writes a long field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getLong(Object,long)



setObject
final native public void setObject(Object o, long fieldID, Object value)(Code)
Writes an Object field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getObject(Object,long)



setShort
final native public void setShort(Object o, long fieldID, short value)(Code)
Writes a short field for the given object. Use the ObjectAccessor.getFieldID(Field) method to obtain the ID for the specific field within a class. For static fields, use the ObjectAccessor.getStaticFieldID(Class,String) method.
Parameters:
  o - object those field needs to be set.
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getShort(Object,long)



setStaticBoolean
final native public void setStaticBoolean(Class c, long fieldID, boolean value)(Code)
Writes a boolean field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticBoolean(Class,long)



setStaticByte
final native public void setStaticByte(Class c, long fieldID, byte value)(Code)
Writes a byte field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticByte(Class,long)



setStaticChar
final native public void setStaticChar(Class c, long fieldID, char value)(Code)
Writes a char field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticChar(Class,long)



setStaticDouble
final native public void setStaticDouble(Class c, long fieldID, double value)(Code)
Writes a double field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticDouble(Class,long)



setStaticFloat
final native public void setStaticFloat(Class c, long fieldID, float value)(Code)
Writes a float field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticFloat(Class,long)



setStaticInt
final native public void setStaticInt(Class c, long fieldID, int value)(Code)
Writes a int field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticInt(Class,long)



setStaticLong
final native public void setStaticLong(Class c, long fieldID, long value)(Code)
Writes a long field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticLong(Class,long)



setStaticObject
final native public void setStaticObject(Class c, long fieldID, Object value)(Code)
Writes an Object field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticObject(Class,long)



setStaticShort
final native public void setStaticShort(Class c, long fieldID, short value)(Code)
Writes a short field for the given class. Use the ObjectAccessor.getStaticFieldID(Class,String) method to obtain the ID for the specific field within a class.
Parameters:
  c - class those field needs to be read
Parameters:
  fieldID - field ID
Parameters:
  value - field value to be set
See Also:   ObjectAccessor.getStaticShort(Class,long)



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.