jas2.util
Class ObjectFactory
- java.lang.Object
-
- jas2.util.ObjectFactory
-
- Direct Known Subclasses:
- DefaultFunctionFactory
public class ObjectFactory extends java.lang.ObjectThe 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
Constructors Constructor and Description ObjectFactory(java.lang.Class c)Create an ObjectFactory capable of creating objects of a specific class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanBeCreatedFrom()Determines if object can be constrcted from the specified types of argumentsbooleancanBeCreatedFrom(java.lang.Class c1)Determines if object can be constrcted from the specified types of argumentsbooleancanBeCreatedFrom(java.lang.Class[] argc)Determines if object can be constrcted from the specified types of argumentsbooleancanBeCreatedFrom(java.lang.Class c1, java.lang.Class c2)Determines if object can be constrcted from the specified types of argumentsbooleancanBeCreatedFrom(java.lang.Class c1, java.lang.Class c2, java.lang.Class c3)Determines if object can be constrcted from the specified types of argumentsbooleancanBeCreatedFrom(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 argumentsbooleancheckAccess()Checks that the class is declared public.java.lang.Objectcreate()Creates an object from the specified argumentsjava.lang.Objectcreate(java.lang.Object a1)Creates an object from the specified argumentsjava.lang.Objectcreate(java.lang.Object[] args)Creates an object from the specified argumentsjava.lang.Objectcreate(java.lang.Object a1, java.lang.Object a2)Creates an object from the specified argumentsjava.lang.Objectcreate(java.lang.Object a1, java.lang.Object a2, java.lang.Object a3)Creates an object from the specified argumentsjava.lang.Objectcreate(java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.Object a4)Creates an object from the specified argumentsjava.lang.ClassgetSourceClass()booleaninheritsFrom(java.lang.Class baseClass)Checks that the class inherits from baseClass
-
-
-
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 ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
create
public java.lang.Object create(java.lang.Object a1) throws ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
create
public java.lang.Object create(java.lang.Object a1, java.lang.Object a2) throws ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
create
public java.lang.Object create(java.lang.Object a1, java.lang.Object a2, java.lang.Object a3) throws ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
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 ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
create
public java.lang.Object create(java.lang.Object[] args) throws ObjectFactoryExceptionCreates an object from the specified arguments- Throws:
ObjectFactoryException
-
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()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG