org.apache.tools.ant.taskdefs

Class PreSetDef.PreSetDefinition

Enclosing Class:
PreSetDef

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

void
checkClass(Project project)
check if the attributes are correct
Object
create(Project project)
Fake create an object, used by IH and UE to see that this is a predefined object.
Object
createObject(Project project)
create an instance of the definition.
ClassLoader
getClassLoader()
get the classloader for this definition
String
getClassName()
get the classname of the definition
Class
getExposedClass(Project project)
get the exposed class for this definition.
UnknownElement
getPreSets()
Class
getTypeClass(Project project)
get the definition class
boolean
sameDefinition(AntTypeDefinition other, Project project)
Equality method for this definition
void
setAdaptToClass(Class adaptToClass)
set the assignable class for this definition.
void
setAdapterClass(Class adapterClass)
set the adapter class for this definition.
void
setClass(Class clazz)
Override so that it is not allowed
void
setClassLoader(ClassLoader classLoader)
set the classloader to use to create an instance of the definition
void
setClassName(String className)
Override so that it is not allowed
boolean
similarDefinition(AntTypeDefinition other, Project project)
Similar method for this definition

Methods inherited from class org.apache.tools.ant.AntTypeDefinition

checkClass, create, getClassLoader, getClassName, getExposedClass, getName, getTypeClass, sameDefinition, setAdaptToClass, setAdapterClass, setClass, setClassLoader, setClassName, setName, similarDefinition

Constructor Details

PreSetDefinition

public PreSetDefinition(AntTypeDefinition parent,
                        UnknownElement el)
Creates a new PresetDefinition instance.
Parameters:
parent - The parent of this predefintion.
el - The predefined attributes, nested elements and text.

Method Details

checkClass

public void checkClass(Project project)
check if the attributes are correct
Overrides:
checkClass in interface AntTypeDefinition
Parameters:
project - the current project

create

public Object create(Project project)
Fake create an object, used by IH and UE to see that this is a predefined object.
Overrides:
create in interface AntTypeDefinition
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 IH and UE.
Parameters:
project - the current project
Returns:
the created object

getClassLoader

public ClassLoader getClassLoader()
get the classloader for this definition
Overrides:
getClassLoader in interface AntTypeDefinition
Returns:
the classloader for this definition

getClassName

public String getClassName()
get the classname of the definition
Overrides:
getClassName in interface AntTypeDefinition
Returns:
the name of the class of this definition

getExposedClass

public Class getExposedClass(Project project)
get the exposed class for this definition.
Overrides:
getExposedClass in interface AntTypeDefinition
Parameters:
project - the current project
Returns:
the exposed class

getPreSets

public UnknownElement getPreSets()
Returns:
the predefined attributes, elements and text as a UnknownElement

getTypeClass

public Class getTypeClass(Project project)
get the definition class
Overrides:
getTypeClass in interface AntTypeDefinition
Parameters:
project - the current project
Returns:
the type of the definition

sameDefinition

public boolean sameDefinition(AntTypeDefinition other,
                              Project project)
Equality method for this definition
Overrides:
sameDefinition in interface AntTypeDefinition
Parameters:
other - another definition
project - the current project
Returns:
true if the definitions are the same

setAdaptToClass

public void setAdaptToClass(Class adaptToClass)
set the assignable class for this definition. NOT SUPPORTED
Overrides:
setAdaptToClass in interface AntTypeDefinition
Parameters:
adaptToClass - the assignable class

setAdapterClass

public void setAdapterClass(Class adapterClass)
set the adapter class for this definition. NOTE Supported
Overrides:
setAdapterClass in interface AntTypeDefinition
Parameters:
adapterClass - the adapterClass

setClass

public void setClass(Class clazz)
Override so that it is not allowed
Overrides:
setClass in interface AntTypeDefinition
Parameters:
clazz - a Class value

setClassLoader

public void setClassLoader(ClassLoader classLoader)
set the classloader to use to create an instance of the definition
Overrides:
setClassLoader in interface AntTypeDefinition
Parameters:
classLoader - the classLoader

setClassName

public void setClassName(String className)
Override so that it is not allowed
Overrides:
setClassName in interface AntTypeDefinition
Parameters:
className - a String value

similarDefinition

public boolean similarDefinition(AntTypeDefinition other,
                                 Project project)
Similar method for this definition
Overrides:
similarDefinition in interface AntTypeDefinition
Parameters:
other - another definition
project - the current project
Returns:
true if the definitions are the same

Copyright B) 2000-2008 Apache Software Foundation. All Rights Reserved.