Package ch.njol.skript.lang.parser
Class LiteralParseCache
java.lang.Object
ch.njol.skript.lang.parser.LiteralParseCache
A cache for literal data strings that failed
Classes.parse(data, Object.class, context).
Results of Classes.parse depend only on registered ClassInfo parsers and
ParseContext, neither of which change during script loading. This cache
is therefore safe to retain for an entire script load batch.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA record representing a failed literal parse attempt. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(LiteralParseCache.Failure failure) Marks a literal parse attempt as failed.voidclear()Clears all cached failures.booleancontains(LiteralParseCache.Failure failure) Returns true if the given literal data string is known to be unparsable in the given context.
-
Constructor Details
-
LiteralParseCache
public LiteralParseCache()
-
-
Method Details
-
contains
Returns true if the given literal data string is known to be unparsable in the given context. -
add
Marks a literal parse attempt as failed. -
clear
public void clear()Clears all cached failures.
-