org.apache.tools.ant.taskdefs

Class PreSetDef.PreSetDefinition

public static class PreSetDef.PreSetDefinition extends AntTypeDefinition

This class contains the unknown element and the object that is predefined.

See Also: AntTypeDefinition

Constructor Summary
PreSetDefinition(AntTypeDefinition parent, UnknownElement el)
Creates a new PresetDefinition instance.
Method Summary
voidcheckClass(Project project)
Check if the attributes are correct.
Objectcreate(Project project)
Fake create an object, used by IntrospectionHelper and UnknownElement to see that this is a predefined object.
ObjectcreateObject(Project project)
Create an instance of the definition.
ClassLoadergetClassLoader()
Get the classloader for this definition.
StringgetClassName()
Get the classname of the definition.
ClassgetExposedClass(Project project)
Get the exposed class for this definition.
UnknownElementgetPreSets()
Get the preset values.
ClassgetTypeClass(Project project)
Get the definition class.
booleansameDefinition(AntTypeDefinition other, Project project)
Equality method for this definition.
voidsetAdapterClass(Class adapterClass)
Set the adapter class for this definition.
voidsetAdaptToClass(Class adaptToClass)
Set the assignable class for this definition.
voidsetClass(Class clazz)
Override so that it is not allowed.
voidsetClassLoader(ClassLoader classLoader)
Set the classloader to use to create an instance of the definition.
voidsetClassName(String className)
Override so that it is not allowed.
booleansimilarDefinition(AntTypeDefinition other, Project project)
Similar method for this definition.

Constructor Detail

PreSetDefinition

public PreSetDefinition(AntTypeDefinition parent, UnknownElement el)
Creates a new PresetDefinition instance.

Parameters: parent The parent of this predefinition. el The predefined attributes, nested elements and text.

Method Detail

checkClass

public void checkClass(Project project)
Check if the attributes are correct.

Parameters: project the current project.

create

public Object create(Project project)
Fake create an object, used by IntrospectionHelper and UnknownElement to see that this is a predefined object.

Parameters: project the current project.

Returns: this object.

createObject

public Object createObject(Project project)
Create an instance of the definition. The instance may be wrapped in a proxy class. This is a special version of create for IntrospectionHelper and UnknownElement.

Parameters: project the current project.

Returns: the created object.

getClassLoader

public ClassLoader getClassLoader()
Get the classloader for this definition.

Returns: the classloader for this definition.

getClassName

public String getClassName()
Get the classname of the definition.

Returns: the name of the class of this definition.

getExposedClass

public Class getExposedClass(Project project)
Get the exposed class for this definition.

Parameters: project the current project.

Returns: the exposed class.

getPreSets

public UnknownElement getPreSets()
Get the preset values.

Returns: the predefined attributes, elements and text as an UnknownElement.

getTypeClass

public Class getTypeClass(Project project)
Get the definition class.

Parameters: project the current project.

Returns: the type of the definition.

sameDefinition

public boolean sameDefinition(AntTypeDefinition other, Project project)
Equality method for this definition.

Parameters: other another definition. project the current project.

Returns: true if the definitions are the same.

setAdapterClass

public void setAdapterClass(Class adapterClass)
Set the adapter class for this definition. NOT Supported

Parameters: adapterClass the adapterClass.

setAdaptToClass

public void setAdaptToClass(Class adaptToClass)
Set the assignable class for this definition. NOT SUPPORTED

Parameters: adaptToClass the assignable class.

setClass

public void setClass(Class clazz)
Override so that it is not allowed.

Parameters: clazz a Class value.

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Set the classloader to use to create an instance of the definition. NOT SUPPORTED

Parameters: classLoader the classLoader.

setClassName

public void setClassName(String className)
Override so that it is not allowed.

Parameters: className a String value.

similarDefinition

public boolean similarDefinition(AntTypeDefinition other, Project project)
Similar method for this definition.

Parameters: other another definition. project the current project.

Returns: true if the definitions are similar.