Modifier | Constructor and Description |
---|---|
protected |
AbstractPlugin()
Initialize the base class by obtaining the resource bundle
associated with the instantiated class.
|
Modifier and Type | Method and Description |
---|---|
protected ResourceBundle |
getBundle()
Get the resource bundle for this class.
|
protected String |
getString(String key)
Get the format string associated with
key from the
resource bundle for this class. |
protected String |
getString(String key,
Object val)
Get the format string associated with
key from the
resource bundle for this class. |
protected String |
getString(String key,
Object val1,
Object val2)
Get the format string associated with
key from the
resource bundle for this class. |
protected String |
getString(String key,
Object v1,
Object v2,
Object v3)
Get the format string associated with
key from the
resource bundle for this class. |
protected void |
handleUnexpectedSubtaskReturn(Object returnedValue,
String source)
Utility method which can be called to process objects of
unexpected type which are returned by a subtask.
|
boolean |
isPluginOption(String opt)
Determine whether
arg is a plugin-specific command-line
option for this plugin and save any necessary state. |
protected String |
taskName(String name)
Return a fully qualified external class name for the given static
inner class name.
|
protected AbstractPlugin()
public boolean isPluginOption(String opt)
Plugin
arg
is a plugin-specific command-line
option for this plugin and save any necessary state. State should
be saved in static fields since plugin instances may not be cached.isPluginOption
in interface Plugin
opt
- the command-line option to examineprotected ResourceBundle getBundle()
protected String getString(String key)
key
from the
resource bundle for this class.key
- the key identifying the format stringprotected String getString(String key, Object val)
key
from the
resource bundle for this class.key
- the key identifying the format stringval
- the value to associate with {0}protected String getString(String key, Object val1, Object val2)
key
from the
resource bundle for this class.key
- the key identifying the format stringval1
- the value to associate with {0}val2
- the value to associate with {1}protected String getString(String key, Object v1, Object v2, Object v3)
key
from the
resource bundle for this class.key
- the key identifying the format stringv1
- the value to associate with {0}v2
- the value to associate with {1}v3
- the value to associate with {2}protected String taskName(String name)
name
- the unqualified name of the inner classprotected void handleUnexpectedSubtaskReturn(Object returnedValue, String source)
returnedValue
is not a Throwable
,
then Thread.dumpStack()
is called to help located
the source of the problem. Otherwise a stacktrace is printed;
the -traces
option does not affect this trace.returnedValue
- the object returned by the subtasksource
- descriptive text identifying the source at the time
the subtask was launchedCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.