Class JOP.metadata.MetaClass
All Packages Class Hierarchy This Package Previous Next Index Home
Class JOP.metadata.MetaClass
java.lang.Object
|
+----JOP.metadata.MetaClass
- public class MetaClass
- extends Object
This is an INTERNAL class.
If instantiated with an instance of a specific class,
this class will read the 'slot' meta-definition
information and allow it to be retrieved.
WARNING: This class uses native methods
WARNING: Use of this class bypasses elements of Java's
security model, specifically instances of any object can be
created even if the calling application would not normally have
access to those objects. Use with care.
-
MetaClass(Object)
- Create a new MetaClass for an existing object
-
forName(String)
- Allows a MetaClass to be created for any valid Java classname.
-
getHashcode()
- Calculate a hash for the object and return the
value of the hash.
-
getObject()
-
-
getSlot(String, String)
- Returns a slot matching the slot field name and the slot
classname.
-
printObject()
- Dumps an object to the console
-
slots()
- Returns an enumerator of the slots of this
object.
-
toString()
-
MetaClass
public MetaClass(Object o) throws Exception
- Create a new MetaClass for an existing object
forName
public static MetaClass forName(String className) throws Exception
- Allows a MetaClass to be created for any valid Java classname.
This method is similar to Class.newInstance() except that
instances are created of any type even if the calling application
does not have access.
toString
public String toString()
- Overrides:
- toString in class Object
printObject
public void printObject()
- Dumps an object to the console
getObject
public Object getObject()
getHashcode
public int getHashcode() throws Exception
- Calculate a hash for the object and return the
value of the hash.
slots
public Enumeration slots()
- Returns an enumerator of the slots of this
object. The slots are returned in the order they
are declared. The slots of the subclass are returned
first, then the slots of the superclass and
so on.
getSlot
public MetaSlot getSlot(String classname,
String name) throws BadSlotName
- Returns a slot matching the slot field name and the slot
classname. Returns 'null' if no matching slot is found.
All Packages Class Hierarchy This Package Previous Next Index Home