Package org.apache.tools.ant.taskdefs
Class PreSetDef.PreSetDefinition
java.lang.Object
org.apache.tools.ant.AntTypeDefinition
org.apache.tools.ant.taskdefs.PreSetDef.PreSetDefinition
- Enclosing class:
PreSetDef
This class contains the unknown element and the object
that is predefined.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPreSetDefinition(AntTypeDefinition parent, UnknownElement el) Creates a newPresetDefinitioninstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClass(Project project) Check if the attributes are correct.Fake create an object, used by IntrospectionHelper and UnknownElement to see that this is a predefined object.createObject(Project project) Create an instance of the definition.Get the classloader for this definition.Get the classname of the definition.Class<?> getExposedClass(Project project) Get the exposed class for this definition.Get the preset values.Class<?> getTypeClass(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.voidOverride 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.Methods inherited from class org.apache.tools.ant.AntTypeDefinition
getName, innerCreateAndSet, innerGetTypeClass, isRestrict, setName, setRestrict
-
Constructor Details
-
PreSetDefinition
Creates a newPresetDefinitioninstance.- Parameters:
parent- The parent of this predefinition.el- The predefined attributes, nested elements and text.
-
-
Method Details
-
setClass
Override so that it is not allowed.- Overrides:
setClassin classAntTypeDefinition- Parameters:
clazz- aClassvalue.
-
setClassName
Override so that it is not allowed.- Overrides:
setClassNamein classAntTypeDefinition- Parameters:
className- aStringvalue.
-
getClassName
Get the classname of the definition.- Overrides:
getClassNamein classAntTypeDefinition- Returns:
- the name of the class of this definition.
-
setAdapterClass
Set the adapter class for this definition. NOT Supported- Overrides:
setAdapterClassin classAntTypeDefinition- Parameters:
adapterClass- the adapterClass.
-
setAdaptToClass
Set the assignable class for this definition. NOT SUPPORTED- Overrides:
setAdaptToClassin classAntTypeDefinition- Parameters:
adaptToClass- the assignable class.
-
setClassLoader
Set the classloader to use to create an instance of the definition. NOT SUPPORTED- Overrides:
setClassLoaderin classAntTypeDefinition- Parameters:
classLoader- the classLoader.
-
getClassLoader
Get the classloader for this definition.- Overrides:
getClassLoaderin classAntTypeDefinition- Returns:
- the classloader for this definition.
-
getExposedClass
Get the exposed class for this definition.- Overrides:
getExposedClassin classAntTypeDefinition- Parameters:
project- the current project.- Returns:
- the exposed class.
-
getTypeClass
Get the definition class.- Overrides:
getTypeClassin classAntTypeDefinition- Parameters:
project- the current project.- Returns:
- the type of the definition.
-
checkClass
Check if the attributes are correct.- Overrides:
checkClassin classAntTypeDefinition- Parameters:
project- the current project.
-
createObject
-
getPreSets
Get the preset values.- Returns:
- the predefined attributes, elements and text as an UnknownElement.
-
create
Fake create an object, used by IntrospectionHelper and UnknownElement to see that this is a predefined object.- Overrides:
createin classAntTypeDefinition- Parameters:
project- the current project.- Returns:
- this object.
-
sameDefinition
Equality method for this definition.- Overrides:
sameDefinitionin classAntTypeDefinition- Parameters:
other- another definition.project- the current project.- Returns:
- true if the definitions are the same.
-
similarDefinition
Similar method for this definition.- Overrides:
similarDefinitionin classAntTypeDefinition- Parameters:
other- another definition.project- the current project.- Returns:
- true if the definitions are similar.
-