Class AbstractFactory<E>
java.lang.Object
com.sk89q.worldedit.internal.registry.AbstractFactory<E>
- Type Parameters:
E
- the element that the factory returns
- Direct Known Subclasses:
BlockFactory
,ItemFactory
,MaskFactory
,PatternFactory
An abstract implementation of a factory for internal usage.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractFactory
(WorldEdit worldEdit, InputParser<E> defaultParser) Create a new factory. -
Method Summary
Modifier and TypeMethodDescriptionList<InputParser<E>>
Gets an immutable list of parsers.getSuggestions
(String input) Deprecated.getSuggestions
(String input, ParserContext context) parseFromInput
(String input, ParserContext context) void
register
(InputParser<E> inputParser) Registers an InputParser to this factory.
-
Field Details
-
worldEdit
-
-
Constructor Details
-
AbstractFactory
Create a new factory.- Parameters:
worldEdit
- the WorldEdit instancedefaultParser
- the parser to fall back to
-
-
Method Details
-
getParsers
Gets an immutable list of parsers.To add parsers, use the register method.
- Returns:
- the parsers
-
parseFromInput
- Throws:
InputParseException
-
getSuggestions
Deprecated. -
getSuggestions
-
register
Registers an InputParser to this factory.- Parameters:
inputParser
- The input parser
-