@Extension public class SymbolLookup extends Object
Symbol.value()| Constructor and Description |
|---|
SymbolLookup() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
find(Class<T> type,
String symbol) |
<T> hudson.model.Descriptor<? extends T> |
findDescriptor(Class<T> type,
String symbol)
Looks for a
Descriptor that has the given symbol |
static SymbolLookup |
get()
Gets the singleton instance.
|
static Set<String> |
getSymbolValue(Class<?> c)
Get the
Symbol value(s) for the given class, if the annotation is present. |
static Set<String> |
getSymbolValue(Object o)
Get the
Symbol value(s) for the class of the given object, generally a Descriptor, if the annotation
is present. |
public <T> T find(Class<T> type, String symbol)
type - Restrict the search to a subset of extensions.public <T> hudson.model.Descriptor<? extends T> findDescriptor(Class<T> type, String symbol)
Descriptor that has the given symboltype - Restrict the search to a subset of Describablepublic static SymbolLookup get()
@Nonnull public static Set<String> getSymbolValue(@Nonnull Object o)
Symbol value(s) for the class of the given object, generally a Descriptor, if the annotation
is present. If the object is in fact a Describable, we'll use its Descriptor class instead.o - An objectSymbol annotation value(s) for the class (generally a Descriptor that object represents,
or an empty Set if the annotation is not present.@Nonnull public static Set<String> getSymbolValue(@Nonnull Class<?> c)
Symbol value(s) for the given class, if the annotation is present. Unlike getSymbolValue(Object),
this will not get the Descriptor for Describable classes.c - A class.Symbol annotation value(s) for the given class, or an empty Set if the annotation is not present.Copyright © 2016. All rights reserved.