org.apache.tools.ant.taskdefs.optional.script

Class ScriptDefBase

    • Constructor Detail

      • ScriptDefBase

        public ScriptDefBase()
    • Method Detail

      • execute

        public void execute()
        Locate the script defining task and execute the script by passing control to it
        Overrides:
        execute in class Task
      • createDynamicElement

        public java.lang.Object createDynamicElement(java.lang.String name)
        Create a nested element
        Specified by:
        createDynamicElement in interface DynamicElement
        Parameters:
        name - the nested element name
        Returns:
        the element to be configured
      • setDynamicAttribute

        public void setDynamicAttribute(java.lang.String name,
                                        java.lang.String value)
        Set a task attribute
        Specified by:
        setDynamicAttribute in interface DynamicAttribute
        Parameters:
        name - the attribute name.
        value - the attribute's string value
      • addText

        public void addText(java.lang.String text)
        Set the script text.
        Parameters:
        text - a component of the script text to be added.
        Since:
        ant1.7
      • getText

        public java.lang.String getText()
        get the text of this element; may be null
        Returns:
        text or null for no nested text
        Since:
        ant1.7
      • fail

        public void fail(java.lang.String message)
        Utility method for nested scripts; throws a BuildException with the given message.
        Parameters:
        message - text to pass to the BuildException
        Throws:
        BuildException - always.
        Since:
        ant1.7