Package org.jenkinsci.plugins.structs
Class SymbolLookup
java.lang.Object
org.jenkinsci.plugins.structs.SymbolLookup
Finds symbol by its name.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Symbol.value()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
Descriptor<?>
findDescriptor
(Class<?> type, String symbol) Looks for aDescriptor
that has the given symbolstatic SymbolLookup
get()
Gets the singleton instance.getSymbolValue
(Class<?> c) Get theSymbol
value(s) for the given class, if the annotation is present.Get theSymbol
value(s) for the class of the given object, generally aDescriptor
, if the annotation is present.
-
Constructor Details
-
SymbolLookup
public SymbolLookup()
-
-
Method Details
-
find
- Parameters:
type
- Restrict the search to a subset of extensions.
-
findDescriptor
Looks for aDescriptor
that has the given symbol- Parameters:
type
- Restrict the search to a subset ofDescribable
-
get
Gets the singleton instance. -
getSymbolValue
Get theSymbol
value(s) for the class of the given object, generally aDescriptor
, if the annotation is present. If the object is in fact aDescribable
, we'll use itsDescriptor
class instead.- Parameters:
o
- An object- Returns:
- The
Symbol
annotation value(s) for the class (generally aDescriptor
that object represents, or an emptySet
if the annotation is not present.
-
getSymbolValue
Get theSymbol
value(s) for the given class, if the annotation is present. This will get theDescriptor
forDescribable
classes.- Parameters:
c
- A class.- Returns:
- The
Symbol
annotation value(s) for the given class, or an emptySet
if the annotation is not present.
-