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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TDescriptor<?> findDescriptor(Class<?> type, String symbol) Looks for aDescriptorthat has the given symbolstatic SymbolLookupget()Gets the singleton instance.getSymbolValue(Class<?> c) Get theSymbolvalue(s) for the given class, if the annotation is present.Get theSymbolvalue(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 aDescriptorthat has the given symbol- Parameters:
type- Restrict the search to a subset ofDescribable
-
get
Gets the singleton instance. -
getSymbolValue
Get theSymbolvalue(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 itsDescriptorclass instead.- Parameters:
o- An object- Returns:
- The
Symbolannotation value(s) for the class (generally aDescriptorthat object represents, or an emptySetif the annotation is not present.
-
getSymbolValue
Get theSymbolvalue(s) for the given class, if the annotation is present. This will get theDescriptorforDescribableclasses.- Parameters:
c- A class.- Returns:
- The
Symbolannotation value(s) for the given class, or an emptySetif the annotation is not present.
-