1 |
/* VMObject.java -- Reference implementation for VM hooks used by Object |
/* VMObject.java -- Reference implementation for VM hooks used by Object |
2 |
Copyright (C) 1998, 2002 Free Software Foundation |
Copyright (C) 1998, 2002, 2005 Free Software Foundation |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
42 |
* As such, it needs help from the VM. |
* As such, it needs help from the VM. |
43 |
* |
* |
44 |
* @author John Keiser |
* @author John Keiser |
45 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
46 |
*/ |
*/ |
47 |
final class VMObject |
final class VMObject |
48 |
{ |
{ |
49 |
/** |
/** |
50 |
|
* Returns the runtime {@link Class} of a given Object. |
51 |
|
* |
52 |
|
* @param obj the object to return the class for. |
53 |
|
* |
54 |
|
* @return the class of the Object. |
55 |
|
*/ |
56 |
|
static native Class getClass(Object obj); |
57 |
|
|
58 |
|
/** |
59 |
* The VM is expected to make a field-for-field shallow copy of the |
* The VM is expected to make a field-for-field shallow copy of the |
60 |
* argument. Thus, the copy has the same runtime type as the argument. |
* argument. Thus, the copy has the same runtime type as the argument. |
61 |
* Note, however, that the cloned object must still be finalizable, even |
* Note, however, that the cloned object must still be finalizable, even |