Class ModuleHelper

java.lang.Object
org.eclipse.ease.modules.ModuleHelper

public final class ModuleHelper
extends Object
  • Method Details

    • getMethods

      public static List<Method> getMethods​(Class<?> clazz)
      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

      public static List<Field> getFields​(Class<?> clazz)
      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

      public static ModuleDefinition resolveModuleName​(String identifier)
      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, a RuntimeException is thrown.
      Parameters:
      identifier - module identifier
      Returns:
      module definition or null in case no matching definition is found
    • getLoadedModules

      public static Collection<ModuleDefinition> getLoadedModules​(IScriptEngine engine)
      Get all loaded modules for a given script engine.
      Parameters:
      engine - engine to parse
      Returns:
      module definitions for all loaded modules
    • getParameters

      public static List<ICodeFactory.Parameter> getParameters​(Method method)
    • isDeprecated

      public static boolean isDeprecated​(AccessibleObject element)
      Check deprecation status of a method/field.
      Parameters:
      element - method/field to check
      Returns:
      true when deprecated