Class PatternFactory
java.lang.Object
com.sk89q.worldedit.internal.registry.AbstractFactory<Pattern>
com.sk89q.worldedit.extension.factory.PatternFactory
A registry of known
Pattern
s. Provides methods to instantiate
new patterns from input.
Instances of this class can be taken from
WorldEdit.getPatternFactory()
.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.internal.registry.AbstractFactory
worldEdit
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseFromInput
(String input, ParserContext context) Parse a string and context to eachInputParser
added to this factory.parseWithoutRich
(String input, ParserContext context) Parses a pattern without considering parsing through theRichPatternParser
, therefore not accepting "richer" parsing where & and , are used.Methods inherited from class com.sk89q.worldedit.internal.registry.AbstractFactory
containsAlias, getParsers, getSuggestions, getSuggestions, register
-
Constructor Details
-
PatternFactory
Create a new instance.- Parameters:
worldEdit
- the WorldEdit instance
-
-
Method Details
-
parseFromInput
Description copied from class:AbstractFactory
Parse a string and context to eachInputParser
added to this factory. If no result found, throwsInputParseException
- Overrides:
parseFromInput
in classAbstractFactory<Pattern>
- Parameters:
input
- input stringcontext
- input context- Returns:
- parsed result
- Throws:
InputParseException
- if no result found
-
parseWithoutRich
Parses a pattern without considering parsing through theRichPatternParser
, therefore not accepting "richer" parsing where & and , are used. Exists to prevent stack overflows.- Parameters:
input
- input stringcontext
- input context- Returns:
- parsed result
- Throws:
InputParseException
- if no result found
-