Class WithScriptDescriptor<T extends WithScriptDescribable<T>>
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescriptor<T>
-
- Direct Known Subclasses:
DeclarativeAgentDescriptor,DeclarativeStageConditionalDescriptor
public abstract class WithScriptDescriptor<T extends WithScriptDescribable<T>> extends Descriptor<T>
Descriptor forWithScriptDescribable.- Author:
- Andrew Bayer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description WithScriptDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()The name for this type.StringgetScriptClass()The full package and class name for theWithScriptScriptclass corresponding to this.TnewInstance()Creates an instance of the correspondingWithScriptDescribablewith no arguments.TnewInstance(Map<String,Object> arguments)Creates an instance of the correspondingWithScriptDescribablefrom the given arguments.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getName
@NonNull public String getName()
The name for this type. Defaults to the first string in theSymbolon the class.- Returns:
- The name.
-
getScriptClass
@NonNull public String getScriptClass()
The full package and class name for theWithScriptScriptclass corresponding to this. Defaults to theWithScriptDescribableclass name with "Script" appended to the end.- Returns:
- The class name, defaulting to the
WithScriptDescribableDescriptor.clazzclass name with "Script" appended.
-
newInstance
public T newInstance(Map<String,Object> arguments) throws Exception
Creates an instance of the correspondingWithScriptDescribablefrom the given arguments.- Parameters:
arguments- A map of strings/objects to be passed to the constructor.- Returns:
- An instantiated
WithScriptDescribable - Throws:
Exception- if there are issues instantiating
-
newInstance
public T newInstance() throws Exception
Creates an instance of the correspondingWithScriptDescribablewith no arguments.- Returns:
- An instantiated
WithScriptDescribable - Throws:
Exception- if there are issues instantiating
-
-