|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.AntTypeDefinition
public class AntTypeDefinition
This class contains all the information on a particular ant type, the classname, adaptor and the class it should be assignable from. This type replaces the task/datatype split of pre ant 1.6.
Constructor Summary | |
---|---|
AntTypeDefinition()
|
Method Summary | |
---|---|
void |
checkClass(Project project)
Checks if the attributes are correct. |
java.lang.Object |
create(Project project)
Create an instance of the definition. |
java.lang.ClassLoader |
getClassLoader()
Get the classloader for this definition. |
java.lang.String |
getClassName()
Get the classname of the definition. |
java.lang.Class |
getExposedClass(Project project)
Get the exposed class for this definition. |
java.lang.String |
getName()
Return the definition's name. |
java.lang.Class |
getTypeClass(Project project)
Get the definition class. |
java.lang.Object |
innerCreateAndSet(java.lang.Class newclass,
Project project)
Inner implementation of the createAndSet(Project, Class) logic, with no
exception catching |
java.lang.Class |
innerGetTypeClass()
Try and load a class, with no attempt to catch any fault. |
boolean |
sameDefinition(AntTypeDefinition other,
Project project)
Equality method for this definition (assumes the names are the same). |
void |
setAdapterClass(java.lang.Class adapterClass)
Set the adapter class for this definition. |
void |
setAdaptToClass(java.lang.Class adaptToClass)
Set the assignable class for this definition. |
void |
setClass(java.lang.Class clazz)
Set the class of the definition. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the classloader to use to create an instance of the definition. |
void |
setClassName(java.lang.String className)
Set the classname of the definition. |
void |
setName(java.lang.String name)
Set the definition's name. |
boolean |
similarDefinition(AntTypeDefinition other,
Project project)
Similar definition; used to compare two definitions defined twice with the same name and the same types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AntTypeDefinition()
Method Detail |
---|
public void setName(java.lang.String name)
name
- the name of the definition.public java.lang.String getName()
public void setClass(java.lang.Class clazz)
clazz
- the class of this definition.public void setClassName(java.lang.String className)
className
- the classname of this definition.public java.lang.String getClassName()
public void setAdapterClass(java.lang.Class adapterClass)
adapterClass
- the adapterClass.public void setAdaptToClass(java.lang.Class adaptToClass)
adaptToClass
- the assignable class.public void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- the ClassLoader.public java.lang.ClassLoader getClassLoader()
public java.lang.Class getExposedClass(Project project)
project
- the current project.
public java.lang.Class getTypeClass(Project project)
project
- the current project.
public java.lang.Class innerGetTypeClass() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the class cannot be found.
java.lang.NoClassDefFoundError
- if the there is an error
finding the class.public java.lang.Object create(Project project)
project
- the current project.
public void checkClass(Project project)
project
- the current project.public java.lang.Object innerCreateAndSet(java.lang.Class newclass, Project project) throws java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
createAndSet(Project, Class)
logic, with no
exception catching
newclass
- class to createproject
- the project to use
java.lang.NoSuchMethodException
- no good construtor.
java.lang.InstantiationException
- cannot initialize the object.
java.lang.IllegalAccessException
- cannot access the object.
java.lang.reflect.InvocationTargetException
- error in invocation.public boolean sameDefinition(AntTypeDefinition other, Project project)
other
- another definition.project
- the project the definition.
public boolean similarDefinition(AntTypeDefinition other, Project project)
other
- the definition to compare to.project
- the current project.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |