public abstract class IlrBRLSemanticCheckerFactory
extends java.lang.Object
The semantic checker factory is a hierarchy of factory. By default, the root factory tries to
interpret the key as a class name and to load and instantiate the class defined by the key.
The class must have a public constructor with one parameter.
The class of the parameter must be String[].
The default factory can be extended to load semantic checkers in a different way.
| Modifier and Type | Field and Description |
|---|---|
protected IlrBRLSemanticCheckerFactory |
parent
The parent factory.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IlrBRLSemanticCheckerFactory(IlrBRLSemanticCheckerFactory parent)
Constructs a semantic checker factory, with its parent factory.
|
| Modifier and Type | Method and Description |
|---|---|
protected static IlrBRLLeadingSemanticFilter |
createLeadingSemanticFilter(java.lang.String key,
java.lang.String[] args,
java.lang.Class descClass)
Creates a leading semantic filter.
|
protected static IlrBRLSemanticAction |
createSemanticAction(java.lang.String key,
java.lang.String[] args,
java.lang.Class descClass)
Creates a semantic action.
|
protected static IlrBRLSemanticFilter |
createSemanticFilter(java.lang.String key,
java.lang.String[] args,
java.lang.Class descClass)
Creates a semantic filter.
|
static IlrBRLLeadingSemanticFilter |
findLeadingSemanticFilter(java.lang.String key,
java.lang.ClassLoader classLoader)
Loads a leading semantic filter into the hierarchy according to the key that defines the leading semantic filter.
|
static IlrBRLLeadingSemanticFilter |
findLeadingSemanticFilter(java.lang.String key,
java.lang.ClassLoader classLoader,
boolean logError)
Loads a leading semantic filter into the hierarchy according to the key that defines the leading semantic filter.
|
static IlrBRLSemanticAction |
findSemanticAction(java.lang.String key,
java.lang.ClassLoader classLoader)
Loads a semantic action into the hierarchy according to the key that defines the semantic action.
|
static IlrBRLSemanticAction |
findSemanticAction(java.lang.String key,
java.lang.ClassLoader classLoader,
boolean logError)
Loads a semantic action into the hierarchy according to the key that defines the semantic action.
|
static IlrBRLSemanticFilter |
findSemanticFilter(java.lang.String key,
java.lang.ClassLoader classLoader)
Loads a semantic filter into the hierarchy according to the key that defines the semantic filter.
|
static IlrBRLSemanticFilter |
findSemanticFilter(java.lang.String key,
java.lang.ClassLoader classLoader,
boolean logError)
Loads a semantic filter into the hierarchy according to the key that defines the semantic filter.
|
static IlrBRLSemanticCheckerFactory |
getFactory()
Returns the current semantic checker factory.
|
static IlrBRLLogger |
getLogger()
This method retrieves a logger that may have been assigned to this factory.
|
protected static java.lang.Class |
loadClass(java.lang.String className,
java.lang.ClassLoader classLoader)
Loads a class in the class loader given in a parameter (before) and (after)
in the class loader
IlrBRLSemanticCheckerFactory. |
protected abstract IlrBRLLeadingSemanticFilter |
loadLeadingSemanticFilter(java.lang.String key,
java.lang.String[] args,
java.lang.ClassLoader classLoader)
Loads a leading semantic filter according to the key that defines the leading semantic filter.
|
protected abstract IlrBRLSemanticAction |
loadSemanticAction(java.lang.String key,
java.lang.String[] args,
java.lang.ClassLoader classLoader)
Loads a semantic action according to the key that defines that semantic action.
|
protected abstract IlrBRLSemanticFilter |
loadSemanticFilter(java.lang.String key,
java.lang.String[] args,
java.lang.ClassLoader classLoader)
Loads a semantic filter according to the key that defines the semantic filter.
|
static void |
setFactory(IlrBRLSemanticCheckerFactory factory)
Sets the new current semantic checker factory.
|
static void |
setLogger(IlrBRLLogger log)
This method allows setting a logger to this factory.
|
protected final IlrBRLSemanticCheckerFactory parent
protected IlrBRLSemanticCheckerFactory(IlrBRLSemanticCheckerFactory parent)
parent - The parent factory.public static IlrBRLLogger getLogger()
public static void setLogger(IlrBRLLogger log)
log - the logger to be associated to this factory.public static IlrBRLSemanticCheckerFactory getFactory()
public static void setFactory(IlrBRLSemanticCheckerFactory factory)
factory - The semantic checker factory.protected static IlrBRLSemanticAction createSemanticAction(java.lang.String key, java.lang.String[] args, java.lang.Class descClass)
String[].key - The key of the semantic action.args - The arguments to instantiate the semantic action.descClass - The class to instantiate.protected static IlrBRLSemanticFilter createSemanticFilter(java.lang.String key, java.lang.String[] args, java.lang.Class descClass)
String[].key - The key of the semantic filter.args - The arguments to instantiate the semantic filter.descClass - The class to instantiate.protected static IlrBRLLeadingSemanticFilter createLeadingSemanticFilter(java.lang.String key, java.lang.String[] args, java.lang.Class descClass)
String[].key - The key of the leading semantic filter.args - The arguments to instantiate the leading semantic filter.descClass - The class to instantiate.protected static java.lang.Class loadClass(java.lang.String className,
java.lang.ClassLoader classLoader)
IlrBRLSemanticCheckerFactory.className - The class name.classLoader - The class loader into which the class is loaded.null if the class does not exist.protected abstract IlrBRLSemanticAction loadSemanticAction(java.lang.String key, java.lang.String[] args, java.lang.ClassLoader classLoader)
key - The key that represents the semantic action.args - The arguments.classLoader - The class loader.protected abstract IlrBRLSemanticFilter loadSemanticFilter(java.lang.String key, java.lang.String[] args, java.lang.ClassLoader classLoader)
key - The key that represents the semantic filter.args - The arguments.classLoader - The class loader.protected abstract IlrBRLLeadingSemanticFilter loadLeadingSemanticFilter(java.lang.String key, java.lang.String[] args, java.lang.ClassLoader classLoader)
key - The key that represents the leading semantic filter.args - The arguments.classLoader - The class loader.public static IlrBRLSemanticAction findSemanticAction(java.lang.String key, java.lang.ClassLoader classLoader)
key - The key that represents the semantic action.classLoader - The class loader.public static IlrBRLSemanticAction findSemanticAction(java.lang.String key, java.lang.ClassLoader classLoader, boolean logError)
key - The key that represents the semantic action.classLoader - The class loader.logError - true to log an error if the semantic action is not found in the factory hierarchypublic static IlrBRLSemanticFilter findSemanticFilter(java.lang.String key, java.lang.ClassLoader classLoader)
key - The key that represents the semantic filter.classLoader - The class loader.public static IlrBRLSemanticFilter findSemanticFilter(java.lang.String key, java.lang.ClassLoader classLoader, boolean logError)
key - The key that represents the semantic filter.classLoader - The class loader.logError - true to log an error if the semantic filter is not found in the factory hierarchypublic static IlrBRLLeadingSemanticFilter findLeadingSemanticFilter(java.lang.String key, java.lang.ClassLoader classLoader)
key - The key that represents the leading semantic filter.classLoader - The class loader.public static IlrBRLLeadingSemanticFilter findLeadingSemanticFilter(java.lang.String key, java.lang.ClassLoader classLoader, boolean logError)
key - The key that represents the leading semantic filter.classLoader - The class loader.logError - true to log an error if the leading semantic filter is not found in the factory hierarchy© Copyright IBM Corp. 1987, 2017