PreSetDef.PreSetDefinition
public class AntTypeDefinition
extends java.lang.Object
Constructor | Description |
---|---|
AntTypeDefinition() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
<T> T |
innerCreateAndSet(java.lang.Class<T> 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 |
isRestrict() |
Get the restrict attribute.
|
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.
|
void |
setRestrict(boolean restrict) |
Set the restrict attribute.
|
boolean |
similarDefinition(AntTypeDefinition other,
Project project) |
Similar definition;
used to compare two definitions defined twice with the same
name and the same types.
|
public void setRestrict(boolean restrict)
restrict
- the value to set.public boolean isRestrict()
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 <T> T innerCreateAndSet(java.lang.Class<T> 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.T
- return type of the methodnewclass
- class to createproject
- the project to usejava.lang.NoSuchMethodException
- no good constructor.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.