Class DescribableHelper
java.lang.Object
org.jenkinsci.plugins.workflow.structs.DescribableHelper
Deprecated.
Utility for converting between
Describable
s (and some other objects) and map-like representations.
Ultimately should live in Jenkins core (or Stapler).-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Deprecated.static final class
Deprecated.static final class
Deprecated.static final class
Deprecated.static final class
Deprecated.A parameter (or array element) which could take any of the indicated concrete object types.static final class
Deprecated.static class
Deprecated.A type of a parameter to a class.static final class
Deprecated.Definition of how a particular class may be configured. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
instantiate
(Class<? extends T> clazz, Map<String, ?> arguments) Deprecated.Creates an instance of a class viaDataBoundConstructor
andDataBoundSetter
.static DescribableHelper.Schema
Deprecated.Loads a definition of the structure of a class: what kind of data you might get back fromuninstantiate(java.lang.Object)
on an instance, or might want to pass toinstantiate(java.lang.Class<? extends T>, java.util.Map<java.lang.String, ?>)
.Deprecated.Computes arguments suitable to pass toinstantiate(java.lang.Class<? extends T>, java.util.Map<java.lang.String, ?>)
to reconstruct this object.
-
Field Details
-
CLAZZ
Deprecated.- See Also:
-
-
Method Details
-
instantiate
Deprecated.Creates an instance of a class viaDataBoundConstructor
andDataBoundSetter
.The arguments may be primitives (as wrappers) or
String
s if that is their declared type.Character
s,Enum
s, andURL
s may be represented byString
s. Other object types may be passed in “raw” as well, but JSON-like structures are encouraged instead. Specifically aList
may be used to represent any list- or array-valued argument. AMap
withString
keys may be used to represent any class which is itself data-bound. In that case the special keyCLAZZ
is used to specify theClass.getName()
; or it may be omitted if the argument is declared to take a concrete type; orClass.getSimpleName()
may be used in case the argument type isDescribable
and only one subtype is registered (as aDescriptor
) with that simple name.- Throws:
Exception
-
uninstantiate
Deprecated.Computes arguments suitable to pass toinstantiate(java.lang.Class<? extends T>, java.util.Map<java.lang.String, ?>)
to reconstruct this object.- Parameters:
o
- a data-bound object- Returns:
- constructor and/or setter parameters
- Throws:
UnsupportedOperationException
- if the class does not follow the expected structure
-
schemaFor
Deprecated.Loads a definition of the structure of a class: what kind of data you might get back fromuninstantiate(java.lang.Object)
on an instance, or might want to pass toinstantiate(java.lang.Class<? extends T>, java.util.Map<java.lang.String, ?>)
.
-
DescribableModel