Package org.pcre4j
Class Pcre2JitCode
java.lang.Object
org.pcre4j.Pcre2Code
org.pcre4j.Pcre2JitCode
A JIT-compiled pattern.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.pcre4j.Pcre2Code
Pcre2Code.NameTableEntry -
Constructor Summary
ConstructorsConstructorDescriptionPcre2JitCode(String pattern, EnumSet<Pcre2CompileOption> options, EnumSet<Pcre2JitOption> jitOptions, Pcre2CompileContext compileContext) Constructor for Pcre2JitCodePcre2JitCode(org.pcre4j.api.IPcre2 api, String pattern, EnumSet<Pcre2CompileOption> options, EnumSet<Pcre2JitOption> jitOptions, Pcre2CompileContext compileContext) Constructor for Pcre2JitCode -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet<Pcre2MatchOption> Get the supported match options for JIT-compiled patterns.intmatch(String subject, int startOffset, EnumSet<Pcre2MatchOption> options, Pcre2MatchData matchData, Pcre2MatchContext matchContext) Match this compiled pattern against a given subject string.Methods inherited from class org.pcre4j.Pcre2Code
api, argOptions, backRefMax, bsr, captureCount, depthLimit, frameSize, handle, hasBackslashC, hasCrOrLf, heapLimit, jChanged, jitSize, matchEmpty, matchLimit, maxLookBehind, minLength, nameCount, nameEntrySize, nameTable, newline, size
-
Constructor Details
-
Pcre2JitCode
public Pcre2JitCode(String pattern, EnumSet<Pcre2CompileOption> options, EnumSet<Pcre2JitOption> jitOptions, Pcre2CompileContext compileContext) Constructor for Pcre2JitCode- Parameters:
pattern- the pattern to compileoptions- the flags to compile the pattern with, seePcre2CompileOptionor null for default optionsjitOptions- the flags to compile the pattern with JIT, seePcre2JitOptionor null for default optionscompileContext- the compile context to use or null
-
Pcre2JitCode
public Pcre2JitCode(org.pcre4j.api.IPcre2 api, String pattern, EnumSet<Pcre2CompileOption> options, EnumSet<Pcre2JitOption> jitOptions, Pcre2CompileContext compileContext) Constructor for Pcre2JitCode- Parameters:
api- the PCRE2 API to usepattern- the pattern to compileoptions- the flags to compile the pattern with, seePcre2CompileOptionor null for default optionsjitOptions- the flags to compile the pattern with JIT, seePcre2JitOptionor null for default optionscompileContext- the compile context to use or null
-
-
Method Details
-
getSupportedMatchOptions
Get the supported match options for JIT-compiled patterns.- Returns:
- the supported match options
-
match
public int match(String subject, int startOffset, EnumSet<Pcre2MatchOption> options, Pcre2MatchData matchData, Pcre2MatchContext matchContext) Description copied from class:Pcre2CodeMatch this compiled pattern against a given subject string.- Overrides:
matchin classPcre2Code- Parameters:
subject- the subject string to match this pattern againststartOffset- offset in the subject at which to start matchingoptions- the options, seePcre2MatchOptionmatchData- the match data to store the results inmatchContext- the match context to use or null- Returns:
- the number of captures plus one, zero if the is too small, or a negative value if there was no match or an actual error occurred
-