public final class ModuleHelper extends Object
Modifier and Type | Method and Description |
---|---|
static List<Field> |
getFields(Class<?> clazz)
Returns a List of exported fields.
|
static Collection<ModuleDefinition> |
getLoadedModules(IScriptEngine engine)
Get all loaded modules for a given script engine.
|
static List<Method> |
getMethods(Class<?> clazz)
Returns a list of exported methods.
|
static List<ICodeFactory.Parameter> |
getParameters(Method method) |
static boolean |
isDeprecated(AccessibleObject element)
Check deprecation status of a method/field.
|
static String |
resolveName(String identifier)
Resolve a relative module name to its absolute name.
|
public static List<Method> getMethods(Class<?> clazz)
clazz
- class to be evaluatedpublic static List<Field> getFields(Class<?> clazz)
clazz
- Class to be evaluatedpublic static String resolveName(String identifier)
RuntimeException
is thrown.identifier
- module identifierpublic static Collection<ModuleDefinition> getLoadedModules(IScriptEngine engine)
engine
- engine to parsepublic static List<ICodeFactory.Parameter> getParameters(Method method)
public static boolean isDeprecated(AccessibleObject element)
element
- method/field to checktrue
when deprecated