Class Link.Launcher
java.lang.Object
org.apache.tools.ant.taskdefs.modules.Link.Launcher
- Enclosing class:
- Link
Child element representing a custom launcher command in a linked image.
 A launcher has a name, which is typically used as a file name for an
 executable file, a Java module name, and optionally a class within
 that module which can act as a standard Java main class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns the attribute of this element which contains the main class to execute in this element's module, if that module doesn't define its main class.Returns the attribute of this element which contains the name of the Java module to execute.getName()Returns this element's name attribute, typically used as the basis of an executable file name.voidsetMainClass(String className) Sets the attribute which contains the main class to execute in this element's module, if that module doesn't define its main class.voidSets the attribute of this element which contains the name of a Java module to execute.voidSets this element's name attribute, which is typically used by the linker to create an executable file with a similar name.toString()Returns this element's information in jlink launcher format: name=module or name=module/mainclass.voidvalidate()Verifies this element's state.
- 
Constructor Details- 
Launcherpublic Launcher()Creates a new, unconfigured element.
- 
LauncherCreates a new element from ajlink-compatible string specifier, which must take the form name=module or name=module/mainclass.- Parameters:
- textSpec- name, module, and optional main class, as described above
- Throws:
- NullPointerException- if argument is- null
- BuildException- if argument does not conform to above requirements
 
 
- 
- 
Method Details- 
getNameReturns this element's name attribute, typically used as the basis of an executable file name.- Returns:
- this element's name
- See Also:
 
- 
setNameSets this element's name attribute, which is typically used by the linker to create an executable file with a similar name. Thus, the name should contain only characters safe for file names.- Parameters:
- name- name of launcher
 
- 
getModuleReturns the attribute of this element which contains the name of the Java module to execute.- Returns:
- this element's module name
 
- 
setModuleSets the attribute of this element which contains the name of a Java module to execute.- Parameters:
- module- name of module to execute
 
- 
getMainClassReturns the attribute of this element which contains the main class to execute in this element's module, if that module doesn't define its main class.- Returns:
- name of main class to execute
 
- 
setMainClassSets the attribute which contains the main class to execute in this element's module, if that module doesn't define its main class.- Parameters:
- className- name of class to execute
 
- 
validatepublic void validate()Verifies this element's state.- Throws:
- BuildException- if name or module is not set
 
- 
toStringReturns this element's information in jlink launcher format: name=module or name=module/mainclass.
 
-