Package oms3.util
Class Components
- java.lang.Object
-
- oms3.util.Components
-
public class Components extends Object
Basic component utility methods.- Author:
- Olaf David
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeclare(PrintStream w, Object... comps)static voidexplore(Object comp)static voidexplore(Object comp, PrintStream w)static voidfigureOutConnect(PrintStream w, Object... comps)Figure out connectivity and generate Java statements.static voidfigureOutMapIn(PrintStream w, Object... comps)static voidfigureOutMapIn0(PrintStream w, Object... comps)static voidfigureOutParamDeclarations(PrintStream w, Object... comps)static List<Class<?>>getComponentClasses(File jar)static List<Class<?>>getComponentClasses(ClassLoader parent, URL... jars)Get all components from a set of jar files.static List<Class<?>>getComponentClasses(URL jar)Get all components from a jar filestatic StringgetDescription(Class<?> comp)static StringgetDescription(Class<?> comp, Locale loc)Get the Component Descriptionstatic URLgetDocumentation(Class<?> comp)Get the documentation with the default localestatic URLgetDocumentation(Class<?> comp, Locale loc)Get the documentation as URL reference;static Collection<Class<?>>internalComponents(Class<?> model)static voidinternalComponents0(Collection<Class<?>> comps, Class<?> model)static List<Field>inVars(Class<?> comp)static List<Field>outVars(Class<?> comp)static List<Field>parameter(Class<?> comp)
-
-
-
Method Detail
-
internalComponents
public static Collection<Class<?>> internalComponents(Class<?> model)
-
internalComponents0
public static void internalComponents0(Collection<Class<?>> comps, Class<?> model)
-
explore
public static void explore(Object comp)
-
explore
public static void explore(Object comp, PrintStream w)
-
figureOutConnect
public static void figureOutConnect(PrintStream w, Object... comps)
Figure out connectivity and generate Java statements.- Parameters:
comps-
-
figureOutParamDeclarations
public static void figureOutParamDeclarations(PrintStream w, Object... comps)
-
declare
public static void declare(PrintStream w, Object... comps)
-
figureOutMapIn
public static void figureOutMapIn(PrintStream w, Object... comps)
-
figureOutMapIn0
public static void figureOutMapIn0(PrintStream w, Object... comps)
-
getComponentClasses
public static List<Class<?>> getComponentClasses(File jar) throws IOException
- Throws:
IOException
-
getComponentClasses
public static List<Class<?>> getComponentClasses(URL jar) throws IOException
Get all components from a jar file- Parameters:
jar-- Returns:
- the list of components from the jar. (Implement 'Execute' annotation)
- Throws:
IOExceptionClassNotFoundException
-
getComponentClasses
public static List<Class<?>> getComponentClasses(ClassLoader parent, URL... jars) throws IOException
Get all components from a set of jar files.- Parameters:
parent- a parentClassLoaderto use. Ifnull, the context classloader will be used.jars- theURLs of the jar to browse for components.- Returns:
- the list of component classes in the jars.
- Throws:
IOException
-
getDocumentation
public static URL getDocumentation(Class<?> comp)
Get the documentation with the default locale- Parameters:
comp- The component to get the documentation from.- Returns:
- the documentation URL or null if not available
-
getDocumentation
public static URL getDocumentation(Class<?> comp, Locale loc)
Get the documentation as URL reference;- Parameters:
comp- The class to get the 'Documentation' tag fromloc- The locale- Returns:
- the URL of the documentation file, null if no documentation is available.
-
-