org.fife.ui.rsyntaxtextarea
public abstract class AbstractTokenMakerFactory extends TokenMakerFactory
TokenMakerFactory
implementations. A
java.util.Map
maps keys to the names of TokenMaker
classes.PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
Modifier | Constructor and Description |
---|---|
protected |
AbstractTokenMakerFactory()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Map |
createTokenMakerKeyToClassNameMap()
Creates and returns a mapping from keys to the names of
TokenMaker implementation classes. |
protected TokenMaker |
getTokenMakerImpl(String key)
Returns a
TokenMaker for the specified key. |
Set |
keySet()
Returns the set of keys that this factory maps to token makers.
|
String |
putMapping(String key,
String className)
Adds a mapping from a key to a
TokenMaker implementation
class name. |
getDefaultInstance, getTokenMaker, setDefaultInstance
protected abstract Map createTokenMakerKeyToClassNameMap()
TokenMaker
implementation classes. When
TokenMakerFactory.getTokenMaker(String)
is called with a key defined in this
map, a TokenMaker
of the corresponding type is returned.createTokenMakerKeyToClassNameMap
in class TokenMakerFactory
protected TokenMaker getTokenMakerImpl(String key)
TokenMaker
for the specified key.getTokenMakerImpl
in class TokenMakerFactory
key
- The key.TokenMaker
, or null
if none matches the specified key.public Set keySet()
keySet
in class TokenMakerFactory