jas.util
Class ObjectFactory

java.lang.Object
  |
  +--jas.util.ObjectFactory

public class ObjectFactory
extends java.lang.Object

The object factory is just a convenience class for creating objects from thier Class pointer. It hides some of the messiness of the java.lang.relect.* classes.


Constructor Summary
ObjectFactory(java.lang.Class c)
          Create an ObjectFactory capable of creating objects of a specific class.
 
Method Summary
 boolean canBeCreatedFrom()
          Determines if object can be constrcted from the specified types of arguments
 boolean canBeCreatedFrom(java.lang.Class c1)
          Determines if object can be constrcted from the specified types of arguments
 boolean canBeCreatedFrom(java.lang.Class[] argc)
          Determines if object can be constrcted from the specified types of arguments
 boolean canBeCreatedFrom(java.lang.Class c1, java.lang.Class c2)
          Determines if object can be constrcted from the specified types of arguments
 boolean canBeCreatedFrom(java.lang.Class c1, java.lang.Class c2, java.lang.Class c3)
          Determines if object can be constrcted from the specified types of arguments
 boolean canBeCreatedFrom(java.lang.Class c1, java.lang.Class c2, java.lang.Class c3, java.lang.Class c4)
          Determines if object can be constrcted from the specified types of arguments
 boolean checkAccess()
          Checks that the class is declared public.
 java.lang.Object create()
          Creates an object from the specified arguments
 java.lang.Object create(java.lang.Object a1)
          Creates an object from the specified arguments
 java.lang.Object create(java.lang.Object[] args)
          Creates an object from the specified arguments
 java.lang.Object create(java.lang.Object a1, java.lang.Object a2)
          Creates an object from the specified arguments
 java.lang.Object create(java.lang.Object a1, java.lang.Object a2, java.lang.Object a3)
          Creates an object from the specified arguments
 java.lang.Object create(java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.Object a4)
          Creates an object from the specified arguments
 java.lang.Class getSourceClass()
           
 boolean inheritsFrom(java.lang.Class baseClass)
          Checks that the class inherits from baseClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectFactory

public ObjectFactory(java.lang.Class c)
Create an ObjectFactory capable of creating objects of a specific class.
Parameters:
c - The class of objects to be created.
Method Detail

create

public java.lang.Object create()
                        throws ObjectFactoryException
Creates an object from the specified arguments

create

public java.lang.Object create(java.lang.Object a1)
                        throws ObjectFactoryException
Creates an object from the specified arguments

create

public java.lang.Object create(java.lang.Object a1,
                               java.lang.Object a2)
                        throws ObjectFactoryException
Creates an object from the specified arguments

create

public java.lang.Object create(java.lang.Object a1,
                               java.lang.Object a2,
                               java.lang.Object a3)
                        throws ObjectFactoryException
Creates an object from the specified arguments

checkAccess

public boolean checkAccess()
Checks that the class is declared public.

inheritsFrom

public boolean inheritsFrom(java.lang.Class baseClass)
Checks that the class inherits from baseClass

create

public java.lang.Object create(java.lang.Object a1,
                               java.lang.Object a2,
                               java.lang.Object a3,
                               java.lang.Object a4)
                        throws ObjectFactoryException
Creates an object from the specified arguments

create

public java.lang.Object create(java.lang.Object[] args)
                        throws ObjectFactoryException
Creates an object from the specified arguments

canBeCreatedFrom

public boolean canBeCreatedFrom()
Determines if object can be constrcted from the specified types of arguments

canBeCreatedFrom

public boolean canBeCreatedFrom(java.lang.Class c1)
Determines if object can be constrcted from the specified types of arguments

canBeCreatedFrom

public boolean canBeCreatedFrom(java.lang.Class c1,
                                java.lang.Class c2)
Determines if object can be constrcted from the specified types of arguments

canBeCreatedFrom

public boolean canBeCreatedFrom(java.lang.Class c1,
                                java.lang.Class c2,
                                java.lang.Class c3)
Determines if object can be constrcted from the specified types of arguments

canBeCreatedFrom

public boolean canBeCreatedFrom(java.lang.Class c1,
                                java.lang.Class c2,
                                java.lang.Class c3,
                                java.lang.Class c4)
Determines if object can be constrcted from the specified types of arguments

canBeCreatedFrom

public boolean canBeCreatedFrom(java.lang.Class[] argc)
Determines if object can be constrcted from the specified types of arguments

getSourceClass

public java.lang.Class getSourceClass()