Package org.eclipse.ease.modules
Class ModuleHelper
java.lang.Object
org.eclipse.ease.modules.ModuleHelper
-
Method Summary
Modifier and TypeMethodDescriptionReturns a List of exported fields.getMethods
(Class<?> clazz) Returns a list of exported methods.static List<ICodeFactory.Parameter>
getParameters
(Method method) static ModuleDefinition
instanceToDefinition
(Object moduleInstance) static boolean
isDeprecated
(AccessibleObject element) Check deprecation status of a method/field.static ModuleDefinition
resolveModuleName
(String identifier) Resolve a relative module name to its definition.
-
Method Details
-
getMethods
Returns a list of exported methods. Any public method marked by a @WrapToScript annotation is exported. If no annotations are found all public methods are returned.- Parameters:
clazz
- class to be evaluated- Returns:
- list of methods
-
getFields
Returns a List of exported fields. Any public final field marked by a @WrapToScript annotation is exported. If no annotations are found all public final fields are returned.- Parameters:
clazz
- Class to be evaluated- Returns:
- List of Fields
-
resolveModuleName
Resolve a relative module name to its definition. When only the last part of a module name is provided (without path), this method tries to locate the module and returns its definition. If 2 modules with the same name are detected, aRuntimeException
is thrown.- Parameters:
identifier
- module identifier- Returns:
- module definition or
null
in case no matching definition is found
-
instanceToDefinition
-
getParameters
-
isDeprecated
Check deprecation status of a method/field.- Parameters:
element
- method/field to check- Returns:
true
when deprecated
-