Class SourceFactory
java.lang.Object
is.galia.source.SourceFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
How sources are chosen bynewSource(java.lang.String)
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Source
newSource
(Identifier identifier, Delegate delegate) IfKey.SOURCE_STATIC
is not set, uses a delegate method to return an instance of a source for the given identifier.static Source
Retrieves an instance by name.
-
Method Details
-
getAllSources
-
getSelectionStrategy
- Returns:
- How sources are chosen by
newSource(java.lang.String)
.
-
newSource
public static Source newSource(String name) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException Retrieves an instance by name.- Parameters:
name
- Class name of the built-in source, or plugin name of the plugin source.- Returns:
- Instance with the given name.
- Throws:
ClassNotFoundException
NoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException
-
newSource
If
Key.SOURCE_STATIC
is not set, uses a delegate method to return an instance of a source for the given identifier. Otherwise, returns an instance of the source specified inKey.SOURCE_STATIC
.Sources are matched in the following order:
- Plugin sources with matching
names
- Built-in sources with matching simple names
- Built-in sources with matching fully qualified names
- Parameters:
identifier
- Identifier of the source image.delegate
- Delegate. May benull
ifgetSelectionStrategy()
returnsSourceFactory.SelectionStrategy.STATIC
.- Returns:
- Instance of the appropriate source for the given identifier, with identifier already set.
- Throws:
IllegalArgumentException
- if the proxy argument isnull
while usingSourceFactory.SelectionStrategy.DELEGATE_SCRIPT
.Exception
- Plugin sources with matching
-