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.


Constructor Index

 o MetaClass(Object)
Create a new MetaClass for an existing object

Method Index

 o forName(String)
Allows a MetaClass to be created for any valid Java classname.
 o getHashcode()
Calculate a hash for the object and return the value of the hash.
 o getObject()
 o getSlot(String, String)
Returns a slot matching the slot field name and the slot classname.
 o printObject()
Dumps an object to the console
 o slots()
Returns an enumerator of the slots of this object.
 o toString()

Constructors

 o MetaClass
  public MetaClass(Object o) throws Exception
Create a new MetaClass for an existing object

Methods

 o 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.
 o toString
  public String toString()
Overrides:
toString in class Object
 o printObject
  public void printObject()
Dumps an object to the console
 o getObject
  public Object getObject()
 o getHashcode
  public int getHashcode() throws Exception
Calculate a hash for the object and return the value of the hash.
 o 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.
 o 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