onig4j
Class OnigRegex

java.lang.Object
  extended by onig4j.OnigRegex
All Implemented Interfaces:
java.io.Closeable

public class OnigRegex
extends java.lang.Object

Oniguruma regex class

See Also:
Oniguruma, Oniguruma API, Oniguruma Regular Expressions, 鬼車, 鬼車インターフェース, 鬼車 正規表現

Nested Class Summary
static interface OnigRegex.Callback
          Callback interface for onig_foreach_name() function.
static interface OnigRegex.WarningListener
          Warning message listener interface for onig_set_warn_func() and onig_set_verb_warn_func() functions.
 
Field Summary
protected  long handle
          object handle.
static int ONIG_MISMATCH
          mismatch
static int ONIG_NO_SUPPORT_CONFIG
          no support in this configuration
static int ONIG_NORMAL
          normal return
static int ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE
          char-class value at end of range
static int ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE
          char-class value at start of range
static int ONIGERR_CONTROL_CODE_SYNTAX
          invalid control-code syntax
static int ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED
          default multibyte-encoding is not setted
static int ONIGERR_EMPTY_CHAR_CLASS
          empty char-class
static int ONIGERR_EMPTY_GROUP_NAME
          group name is empty
static int ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS
          empty range in char class
static int ONIGERR_END_PATTERN_AT_CONTROL
          end pattern at control
static int ONIGERR_END_PATTERN_AT_ESCAPE
          end pattern at escape
static int ONIGERR_END_PATTERN_AT_LEFT_BRACE
          end pattern at left brace
static int ONIGERR_END_PATTERN_AT_LEFT_BRACKET
          end pattern at left bracket
static int ONIGERR_END_PATTERN_AT_META
          end pattern at meta
static int ONIGERR_END_PATTERN_IN_GROUP
          end pattern in group
static int ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
          end pattern with unmatched parenthesis
static int ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY
          group number is too big for capture history
static int ONIGERR_INVALID_ARGUMENT
          invalid argument
static int ONIGERR_INVALID_BACKREF
          invalid backref number/name
static int ONIGERR_INVALID_CHAR_IN_GROUP_NAME
          invalid char in group name <%n>
(invalid char in group number <%n>)
static int ONIGERR_INVALID_CHAR_PROPERTY_NAME
          invalid character property name {%n}
static int ONIGERR_INVALID_CODE_POINT_VALUE
          invalid code point value
static int ONIGERR_INVALID_COMBINATION_OF_OPTIONS
          invalid combination of options
static int ONIGERR_INVALID_GROUP_NAME
          invalid group name <%n>
static int ONIGERR_INVALID_LOOK_BEHIND_PATTERN
          invalid pattern in look-behind
static int ONIGERR_INVALID_POSIX_BRACKET_TYPE
          invalid POSIX bracket type
static int ONIGERR_INVALID_REPEAT_RANGE_PATTERN
          invalid repeat range {lower,upper}
static int ONIGERR_INVALID_WIDE_CHAR_VALUE
          UNKOWN
static int ONIGERR_MATCH_STACK_LIMIT_OVER
          match-stack limit over
static int ONIGERR_MEMORY
          fail to memory allocation
static int ONIGERR_META_CODE_SYNTAX
          invalid meta-code syntax
static int ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE
          mismatch multibyte code length in char-class range
static int ONIGERR_MULTIPLEX_DEFINED_NAME
          multiplex defined name <%n>
static int ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL
          multiplex definition name <%n> call
static int ONIGERR_NESTED_REPEAT_OPERATOR
          nested repeat operator
static int ONIGERR_NEVER_ENDING_RECURSION
          never ending recursion
static int ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION
          not supported encoding combination
static int ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED
          numbered backref/call is not allowed.
static int ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
          over thread pass limit count
static int ONIGERR_PARSER_BUG
          internal parser error (bug)
static int ONIGERR_PREMATURE_END_OF_CHAR_CLASS
          premature end of char-class
static int ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
          can't convert to wide-char on specified multibyte-encoding
static int ONIGERR_STACK_BUG
          stack error (bug)
static int ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID
          target of repeat operator is invalid
static int ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
          target of repeat operator is not specified
static int ONIGERR_TOO_BIG_BACKREF_NUMBER
          too big backref number
static int ONIGERR_TOO_BIG_NUMBER
          too big number
static int ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE
          too big number for repeat range
static int ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
          too big wide-char value
static int ONIGERR_TOO_LONG_WIDE_CHAR_VALUE
          too long wide-char value
static int ONIGERR_TOO_MANY_MULTI_BYTE_RANGES
          too many multibyte code ranges are specified
static int ONIGERR_TOO_SHORT_MULTI_BYTE_STRING
          too short multibyte code string
static int ONIGERR_TYPE_BUG
          undefined type (bug)
static int ONIGERR_UNDEFINED_BYTECODE
          undefined bytecode (bug)
static int ONIGERR_UNDEFINED_GROUP_OPTION
          undefined group option
static int ONIGERR_UNDEFINED_GROUP_REFERENCE
          undefined group <%n> reference
static int ONIGERR_UNDEFINED_NAME_REFERENCE
          undefined name <%n> reference
static int ONIGERR_UNEXPECTED_BYTECODE
          unexpected bytecode (bug)
static int ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
          unmatched close parenthesis
static int ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS
          unmatched range specifier in char-class
static int ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE
          upper is smaller than lower in repeat range
 
Constructor Summary
  OnigRegex(java.lang.String pattern)
          invoke onig_new() function with ONIG_OPTION_NONE and ONIG_SYNTAX_DEFAULT.
  OnigRegex(java.lang.String pattern, java.util.Collection<OnigOptionType> options)
          invoke onig_new() function with ONIG_SYNTAX_DEFAULT.
  OnigRegex(java.lang.String pattern, OnigCaseFoldType flag, java.util.Collection<OnigOptionType> options)
          invoke onig_new_deluxe() function with ONIG_SYNTAX_DEFAULT.
  OnigRegex(java.lang.String pattern, OnigCaseFoldType flag, OnigOptionType... options)
          invoke onig_new_deluxe() function with ONIG_SYNTAX_DEFAULT.
  OnigRegex(java.lang.String pattern, OnigOptionType... options)
          invoke onig_new() function with ONIG_SYNTAX_DEFAULT.
  OnigRegex(java.lang.String pattern, OnigSyntaxType syntax)
          invoke onig_new() function with ONIG_OPTION_NONE.
  OnigRegex(java.lang.String pattern, OnigSyntaxType syntax, java.util.Collection<OnigOptionType> options)
          invoke onig_new() function.
  OnigRegex(java.lang.String pattern, OnigSyntaxType syntax, OnigCaseFoldType flag, java.util.Collection<OnigOptionType> options)
          invoke onig_new_deluxe() function.
protected OnigRegex(java.lang.String pattern, OnigSyntaxType syntax, OnigCaseFoldType flag, int options)
          invoke onig_new() or onig_new_deluxe() function.
  OnigRegex(java.lang.String pattern, OnigSyntaxType syntax, OnigCaseFoldType flag, OnigOptionType... options)
          invoke onig_new_deluxe() function.
  OnigRegex(java.lang.String pattern, OnigSyntaxType syntax, OnigOptionType... options)
          invoke onig_new() function.
 
Method Summary
 int captureCount()
          invoke onig_number_of_captures() function.
 int captureHistoryCount()
          invoke onig_number_of_capture_histories() function.
static void clearVerboseWarningListener()
          clear onig_set_verb_warn_func() listener object.
static void clearWarningListener()
          clear onig_set_warn_func() listener object.
 void close()
          invoke free() method.
protected  void finalize()
          invoke close() method.
protected static void fireWarning(java.lang.String msg)
           
protected static void fireWarningVerbose(java.lang.String msg)
           
 int foreachName(OnigRegex.Callback callback)
          invoke onig_foreach_name() function.
protected  void free()
          invoke onig_free() function.
 int getBackRefNumber(java.lang.String name, OnigRegion region)
          invoke onig_name_to_backref_number() function.
 OnigCaseFoldType getCaseFoldType()
          invoke onig_get_case_fold_flag() function.
static java.nio.charset.Charset getEncoding()
          Returns the charset object of this instance.
NOTE: The onig_get_encoding() function is not called.
static java.lang.String getErrorMessage(int ecode, java.lang.String param)
          invoke onig_error_code_to_str() function.
 int[] getGroupNumbers(java.lang.String name)
          invoke onig_name_to_group_numbers() function.
static int getMatchStackLimitSize()
          invoke onig_get_match_stack_limit_size() function.
 java.util.EnumSet<OnigOptionType> getOptionType()
          invoke onig_get_options() function.
 OnigSyntaxType getSyntaxType()
          Returns the syntax object of this instance.
NOTE: The onig_get_syntax() function is not called.
static java.lang.String getVersion()
          invoke onig_version() function.
 boolean isActiveNonameGroupCaputure()
          invoke onig_noname_group_capture_is_active() function.
static boolean isSyntaxError(int ecode)
          This method is in stead of ONIG_IS_PATTERN_ERROR() macro.
 int match(java.lang.CharSequence input, int at)
          invoke match(input, input.length(), at, null, ONIG_OPTION_NONE) method.
 int match(java.lang.CharSequence input, int at, java.util.Collection<OnigOptionType> options)
          invoke match(input, input.length(), at, null, options) method.
 int match(java.lang.CharSequence input, int end, int at)
          invoke match(input, end, at, null, ONIG_OPTION_NONE) method.
 int match(java.lang.CharSequence input, int end, int at, java.util.Collection<OnigOptionType> options)
          invoke match(input, end, at, null, options) method.
 int match(java.lang.CharSequence input, int end, int at, OnigOptionType... options)
          invoke match(input, end, at, null, options) method.
 int match(java.lang.CharSequence input, int end, int at, OnigRegion region)
          invoke match(input, end, at, region, ONIG_OPTION_NONE) method.
 int match(java.lang.CharSequence input, int end, int at, OnigRegion region, java.util.Collection<OnigOptionType> options)
          invoke onig_match() function.
protected  int match(java.lang.CharSequence input, int end, int at, OnigRegion region, int options)
          invoke onig_match() function.
 int match(java.lang.CharSequence input, int end, int at, OnigRegion region, OnigOptionType... options)
          invoke onig_match() function.
 int match(java.lang.CharSequence input, int at, OnigOptionType... options)
          invoke match(input, input.length(), at, null, options) method.
 int match(java.lang.CharSequence input, int at, OnigRegion region)
          invoke match(input, input.length(), at, region, ONIG_OPTION_NONE) method.
 int match(java.lang.CharSequence input, int at, OnigRegion region, java.util.Collection<OnigOptionType> options)
          invoke match(input, input.length(), at, region, options) method.
 int match(java.lang.CharSequence input, int at, OnigRegion region, OnigOptionType... options)
          invoke match(input, input.length(), at, region, options) method.
 int nameCount()
          invoke onig_number_of_names() function.
 java.lang.String pattern()
          Returns the regular expression from which this pattern was compiled.
 int search(java.lang.CharSequence input)
          invoke search(input, input.length(), 0, input.length(), null, ONIG_OPTION_NONE) method.
 int search(java.lang.CharSequence input, java.util.Collection<OnigOptionType> options)
          invoke search(input, input.length(), 0, input.length(), null, options) method.
 int search(java.lang.CharSequence input, int end, int start, int range)
          invoke search(input, end, start, range, null, ONIG_OPTION_NONE) method.
 int search(java.lang.CharSequence input, int end, int start, int range, java.util.Collection<OnigOptionType> options)
          invoke search(input, end, start, range, null, options) method.
 int search(java.lang.CharSequence input, int end, int start, int range, OnigOptionType... options)
          invoke search(input, end, start, range, null, options) method.
 int search(java.lang.CharSequence input, int end, int start, int range, OnigRegion region)
          invoke search(input, end, start, range, region, ONIG_OPTION_NONE) method.
 int search(java.lang.CharSequence input, int end, int start, int range, OnigRegion region, java.util.Collection<OnigOptionType> options)
          invoke onig_search() function.
protected  int search(java.lang.CharSequence input, int end, int start, int range, OnigRegion region, int options)
          invoke onig_search() function.
 int search(java.lang.CharSequence input, int end, int start, int range, OnigRegion region, OnigOptionType... options)
          invoke onig_search() function.
 int search(java.lang.CharSequence input, OnigOptionType... options)
          invoke search(input, input.length(), 0, input.length(), null, options) method.
 int search(java.lang.CharSequence input, OnigRegion region)
          invoke search(input, input.length(), 0, input.length(), region, ONIG_OPTION_NONE) method.
 int search(java.lang.CharSequence input, OnigRegion region, java.util.Collection<OnigOptionType> options)
          invoke search(input, input.length(), 0, input.length(), region, options) method.
 int search(java.lang.CharSequence input, OnigRegion region, OnigOptionType... options)
          invoke search(input, input.length(), 0, input.length(), region, options) method.
static void setMatchStackLimitSize(int size)
          invoke onig_set_match_stack_limit_size() function.
static boolean setVerboseWarningListener(OnigRegex.WarningListener listener)
          invoke onig_set_verb_warn_func() function.
static boolean setWarningListener(OnigRegex.WarningListener listener)
          invoke onig_set_warn_func() function.
 java.util.List<java.lang.String> split(java.lang.CharSequence input)
          invoke splite(input, 0, OnigOptionType.ONIG_OPTION_NONE) method.
 java.util.List<java.lang.String> split(java.lang.CharSequence input, java.util.Collection<OnigOptionType> options)
          invoke splite(input, 0, option) method.
 java.util.List<java.lang.String> split(java.lang.CharSequence input, int limit)
          invoke splite(input, limit, OnigOptionType.ONIG_OPTION_NONE) method.
 java.util.List<java.lang.String> split(java.lang.CharSequence input, int limit, java.util.Collection<OnigOptionType> options)
          Splits the given string around matches of this pattern.
protected  java.util.List<java.lang.String> split(java.lang.CharSequence input, int limit, int options)
          Splits the given string around matches of this pattern.
 java.util.List<java.lang.String> split(java.lang.CharSequence input, int limit, OnigOptionType... options)
          Splits the given string around matches of this pattern.
 java.util.List<java.lang.String> split(java.lang.CharSequence input, OnigOptionType... options)
          invoke splite(input, 0, option) method.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONIG_NORMAL

public static final int ONIG_NORMAL
normal return

See Also:
Constant Field Values

ONIG_MISMATCH

public static final int ONIG_MISMATCH
mismatch

See Also:
Constant Field Values

ONIG_NO_SUPPORT_CONFIG

public static final int ONIG_NO_SUPPORT_CONFIG
no support in this configuration

See Also:
Constant Field Values

ONIGERR_MEMORY

public static final int ONIGERR_MEMORY
fail to memory allocation

See Also:
Constant Field Values

ONIGERR_TYPE_BUG

public static final int ONIGERR_TYPE_BUG
undefined type (bug)

See Also:
Constant Field Values

ONIGERR_PARSER_BUG

public static final int ONIGERR_PARSER_BUG
internal parser error (bug)

See Also:
Constant Field Values

ONIGERR_STACK_BUG

public static final int ONIGERR_STACK_BUG
stack error (bug)

See Also:
Constant Field Values

ONIGERR_UNDEFINED_BYTECODE

public static final int ONIGERR_UNDEFINED_BYTECODE
undefined bytecode (bug)

See Also:
Constant Field Values

ONIGERR_UNEXPECTED_BYTECODE

public static final int ONIGERR_UNEXPECTED_BYTECODE
unexpected bytecode (bug)

See Also:
Constant Field Values

ONIGERR_MATCH_STACK_LIMIT_OVER

public static final int ONIGERR_MATCH_STACK_LIMIT_OVER
match-stack limit over

See Also:
Constant Field Values

ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED

public static final int ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED
default multibyte-encoding is not setted

See Also:
Constant Field Values

ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR

public static final int ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
can't convert to wide-char on specified multibyte-encoding

See Also:
Constant Field Values

ONIGERR_INVALID_ARGUMENT

public static final int ONIGERR_INVALID_ARGUMENT
invalid argument

See Also:
Constant Field Values

ONIGERR_END_PATTERN_AT_LEFT_BRACE

public static final int ONIGERR_END_PATTERN_AT_LEFT_BRACE
end pattern at left brace

See Also:
Constant Field Values

ONIGERR_END_PATTERN_AT_LEFT_BRACKET

public static final int ONIGERR_END_PATTERN_AT_LEFT_BRACKET
end pattern at left bracket

See Also:
Constant Field Values

ONIGERR_EMPTY_CHAR_CLASS

public static final int ONIGERR_EMPTY_CHAR_CLASS
empty char-class

See Also:
Constant Field Values

ONIGERR_PREMATURE_END_OF_CHAR_CLASS

public static final int ONIGERR_PREMATURE_END_OF_CHAR_CLASS
premature end of char-class

See Also:
Constant Field Values

ONIGERR_END_PATTERN_AT_ESCAPE

public static final int ONIGERR_END_PATTERN_AT_ESCAPE
end pattern at escape

See Also:
Constant Field Values

ONIGERR_END_PATTERN_AT_META

public static final int ONIGERR_END_PATTERN_AT_META
end pattern at meta

See Also:
Constant Field Values

ONIGERR_END_PATTERN_AT_CONTROL

public static final int ONIGERR_END_PATTERN_AT_CONTROL
end pattern at control

See Also:
Constant Field Values

ONIGERR_META_CODE_SYNTAX

public static final int ONIGERR_META_CODE_SYNTAX
invalid meta-code syntax

See Also:
Constant Field Values

ONIGERR_CONTROL_CODE_SYNTAX

public static final int ONIGERR_CONTROL_CODE_SYNTAX
invalid control-code syntax

See Also:
Constant Field Values

ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE

public static final int ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE
char-class value at end of range

See Also:
Constant Field Values

ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE

public static final int ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE
char-class value at start of range

See Also:
Constant Field Values

ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS

public static final int ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS
unmatched range specifier in char-class

See Also:
Constant Field Values

ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED

public static final int ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
target of repeat operator is not specified

See Also:
Constant Field Values

ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID

public static final int ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID
target of repeat operator is invalid

See Also:
Constant Field Values

ONIGERR_NESTED_REPEAT_OPERATOR

public static final int ONIGERR_NESTED_REPEAT_OPERATOR
nested repeat operator

See Also:
Constant Field Values

ONIGERR_UNMATCHED_CLOSE_PARENTHESIS

public static final int ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
unmatched close parenthesis

See Also:
Constant Field Values

ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS

public static final int ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
end pattern with unmatched parenthesis

See Also:
Constant Field Values

ONIGERR_END_PATTERN_IN_GROUP

public static final int ONIGERR_END_PATTERN_IN_GROUP
end pattern in group

See Also:
Constant Field Values

ONIGERR_UNDEFINED_GROUP_OPTION

public static final int ONIGERR_UNDEFINED_GROUP_OPTION
undefined group option

See Also:
Constant Field Values

ONIGERR_INVALID_POSIX_BRACKET_TYPE

public static final int ONIGERR_INVALID_POSIX_BRACKET_TYPE
invalid POSIX bracket type

See Also:
Constant Field Values

ONIGERR_INVALID_LOOK_BEHIND_PATTERN

public static final int ONIGERR_INVALID_LOOK_BEHIND_PATTERN
invalid pattern in look-behind

See Also:
Constant Field Values

ONIGERR_INVALID_REPEAT_RANGE_PATTERN

public static final int ONIGERR_INVALID_REPEAT_RANGE_PATTERN
invalid repeat range {lower,upper}

See Also:
Constant Field Values

ONIGERR_TOO_BIG_NUMBER

public static final int ONIGERR_TOO_BIG_NUMBER
too big number

See Also:
Constant Field Values

ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE

public static final int ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE
too big number for repeat range

See Also:
Constant Field Values

ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE

public static final int ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE
upper is smaller than lower in repeat range

See Also:
Constant Field Values

ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS

public static final int ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS
empty range in char class

See Also:
Constant Field Values

ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE

public static final int ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE
mismatch multibyte code length in char-class range

See Also:
Constant Field Values

ONIGERR_TOO_MANY_MULTI_BYTE_RANGES

public static final int ONIGERR_TOO_MANY_MULTI_BYTE_RANGES
too many multibyte code ranges are specified

See Also:
Constant Field Values

ONIGERR_TOO_SHORT_MULTI_BYTE_STRING

public static final int ONIGERR_TOO_SHORT_MULTI_BYTE_STRING
too short multibyte code string

See Also:
Constant Field Values

ONIGERR_TOO_BIG_BACKREF_NUMBER

public static final int ONIGERR_TOO_BIG_BACKREF_NUMBER
too big backref number

See Also:
Constant Field Values

ONIGERR_INVALID_BACKREF

public static final int ONIGERR_INVALID_BACKREF
invalid backref number/name

See Also:
Constant Field Values

ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED

public static final int ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED
numbered backref/call is not allowed. (use name)

See Also:
Constant Field Values

ONIGERR_TOO_LONG_WIDE_CHAR_VALUE

public static final int ONIGERR_TOO_LONG_WIDE_CHAR_VALUE
too long wide-char value

See Also:
Constant Field Values

ONIGERR_EMPTY_GROUP_NAME

public static final int ONIGERR_EMPTY_GROUP_NAME
group name is empty

See Also:
Constant Field Values

ONIGERR_INVALID_GROUP_NAME

public static final int ONIGERR_INVALID_GROUP_NAME
invalid group name <%n>

See Also:
Constant Field Values

ONIGERR_INVALID_CHAR_IN_GROUP_NAME

public static final int ONIGERR_INVALID_CHAR_IN_GROUP_NAME
invalid char in group name <%n>
(invalid char in group number <%n>)

See Also:
Constant Field Values

ONIGERR_UNDEFINED_NAME_REFERENCE

public static final int ONIGERR_UNDEFINED_NAME_REFERENCE
undefined name <%n> reference

See Also:
Constant Field Values

ONIGERR_UNDEFINED_GROUP_REFERENCE

public static final int ONIGERR_UNDEFINED_GROUP_REFERENCE
undefined group <%n> reference

See Also:
Constant Field Values

ONIGERR_MULTIPLEX_DEFINED_NAME

public static final int ONIGERR_MULTIPLEX_DEFINED_NAME
multiplex defined name <%n>

See Also:
Constant Field Values

ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL

public static final int ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL
multiplex definition name <%n> call

See Also:
Constant Field Values

ONIGERR_NEVER_ENDING_RECURSION

public static final int ONIGERR_NEVER_ENDING_RECURSION
never ending recursion

See Also:
Constant Field Values

ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY

public static final int ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY
group number is too big for capture history

See Also:
Constant Field Values

ONIGERR_INVALID_CHAR_PROPERTY_NAME

public static final int ONIGERR_INVALID_CHAR_PROPERTY_NAME
invalid character property name {%n}

See Also:
Constant Field Values

ONIGERR_INVALID_CODE_POINT_VALUE

public static final int ONIGERR_INVALID_CODE_POINT_VALUE
invalid code point value

See Also:
Constant Field Values

ONIGERR_INVALID_WIDE_CHAR_VALUE

public static final int ONIGERR_INVALID_WIDE_CHAR_VALUE
UNKOWN

See Also:
Constant Field Values

ONIGERR_TOO_BIG_WIDE_CHAR_VALUE

public static final int ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
too big wide-char value

See Also:
Constant Field Values

ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION

public static final int ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION
not supported encoding combination

See Also:
Constant Field Values

ONIGERR_INVALID_COMBINATION_OF_OPTIONS

public static final int ONIGERR_INVALID_COMBINATION_OF_OPTIONS
invalid combination of options

See Also:
Constant Field Values

ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT

public static final int ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
over thread pass limit count

See Also:
Constant Field Values

handle

protected volatile long handle
object handle.

Constructor Detail

OnigRegex

public OnigRegex(java.lang.String pattern)
invoke onig_new() function with ONIG_OPTION_NONE and ONIG_SYNTAX_DEFAULT.

Parameters:
pattern - The regex pattern string
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigOptionType...)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigOptionType... options)
invoke onig_new() function with ONIG_SYNTAX_DEFAULT.

Parameters:
pattern - The regex pattern string
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigOptionType...)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 java.util.Collection<OnigOptionType> options)
invoke onig_new() function with ONIG_SYNTAX_DEFAULT.

Parameters:
pattern - The regex pattern string
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, java.util.Collection)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigCaseFoldType flag,
                 OnigOptionType... options)
invoke onig_new_deluxe() function with ONIG_SYNTAX_DEFAULT.

Parameters:
pattern - The regex pattern string
flag - The character matching case fold bit flag for ONIG_OPTION_IGNORECASE mode. (null is allowed)
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, onig4j.OnigOptionType...)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigCaseFoldType flag,
                 java.util.Collection<OnigOptionType> options)
invoke onig_new_deluxe() function with ONIG_SYNTAX_DEFAULT.

Parameters:
pattern - The regex pattern string
flag - The character matching case fold bit flag for ONIG_OPTION_IGNORECASE mode. (null is allowed)
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, java.util.Collection)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigSyntaxType syntax)
invoke onig_new() function with ONIG_OPTION_NONE.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigOptionType...)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigSyntaxType syntax,
                 OnigOptionType... options)
invoke onig_new() function.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, int)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigSyntaxType syntax,
                 java.util.Collection<OnigOptionType> options)
invoke onig_new() function.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, int)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigSyntaxType syntax,
                 OnigCaseFoldType flag,
                 OnigOptionType... options)
invoke onig_new_deluxe() function.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition (null is allowed)
flag - The character matching case fold bit flag for ONIG_OPTION_IGNORECASE mode. (null is allowed)
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, int)

OnigRegex

public OnigRegex(java.lang.String pattern,
                 OnigSyntaxType syntax,
                 OnigCaseFoldType flag,
                 java.util.Collection<OnigOptionType> options)
invoke onig_new_deluxe() function.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition (null is allowed)
flag - The character matching case fold bit flag for ONIG_OPTION_IGNORECASE mode. (null is allowed)
options - The compile time options
See Also:
OnigRegex(java.lang.String, onig4j.OnigSyntaxType, onig4j.OnigCaseFoldType, int)

OnigRegex

protected OnigRegex(java.lang.String pattern,
                    OnigSyntaxType syntax,
                    OnigCaseFoldType flag,
                    int options)
invoke onig_new() or onig_new_deluxe() function.

Parameters:
pattern - The regex pattern string
syntax - The pattern syntax definition (null is allowed)
flag - The character matching case fold bit flag for ONIG_OPTION_IGNORECASE mode. (null is allowed)
options - The compile time options
Method Detail

free

protected final void free()
invoke onig_free() function.


getBackRefNumber

public int getBackRefNumber(java.lang.String name,
                            OnigRegion region)
invoke onig_name_to_backref_number() function.

Parameters:
name - The group name
region - The region object (null is allowed)
Returns:
The group number

getGroupNumbers

public int[] getGroupNumbers(java.lang.String name)
invoke onig_name_to_group_numbers() function.

Parameters:
name - The group name
Returns:
The number of groups for the name

getEncoding

public static java.nio.charset.Charset getEncoding()
Returns the charset object of this instance.
NOTE: The onig_get_encoding() function is not called.

Returns:
The charset object

getOptionType

public java.util.EnumSet<OnigOptionType> getOptionType()
invoke onig_get_options() function.

Returns:
The value of OnigOptionType

getCaseFoldType

public OnigCaseFoldType getCaseFoldType()
invoke onig_get_case_fold_flag() function.

Returns:
The value of OnigCaseFoldType

getSyntaxType

public OnigSyntaxType getSyntaxType()
Returns the syntax object of this instance.
NOTE: The onig_get_syntax() function is not called.

Returns:
The OnigSyntaxType object

pattern

public java.lang.String pattern()
Returns the regular expression from which this pattern was compiled.

Returns:
The source of this pattern

isActiveNonameGroupCaputure

public boolean isActiveNonameGroupCaputure()
invoke onig_noname_group_capture_is_active() function.

Returns:
true if the noname group capture is active

search

public int search(java.lang.CharSequence input)
invoke search(input, input.length(), 0, input.length(), null, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be searched
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  OnigOptionType... options)
invoke search(input, input.length(), 0, input.length(), null, options) method.

Parameters:
input - The character sequence to be searched
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  java.util.Collection<OnigOptionType> options)
invoke search(input, input.length(), 0, input.length(), null, options) method.

Parameters:
input - The character sequence to be searched
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  OnigRegion region)
invoke search(input, input.length(), 0, input.length(), region, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be searched
region - The region object for return group match range info (null is allowed)
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  OnigRegion region,
                  OnigOptionType... options)
invoke search(input, input.length(), 0, input.length(), region, options) method.

Parameters:
input - The character sequence to be searched
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  OnigRegion region,
                  java.util.Collection<OnigOptionType> options)
invoke search(input, input.length(), 0, input.length(), region, options) method.

Parameters:
input - The character sequence to be searched
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range)
invoke search(input, end, start, range, null, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range,
                  OnigRegion region)
invoke search(input, end, start, range, region, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
region - The region object for return group match range info (null is allowed)
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range,
                  OnigOptionType... options)
invoke search(input, end, start, range, null, options) method.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range,
                  java.util.Collection<OnigOptionType> options)
invoke search(input, end, start, range, null, options) method.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range,
                  OnigRegion region,
                  OnigOptionType... options)
invoke onig_search() function.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

public int search(java.lang.CharSequence input,
                  int end,
                  int start,
                  int range,
                  OnigRegion region,
                  java.util.Collection<OnigOptionType> options)
invoke onig_search() function.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The index of the first character matched
See Also:
search(java.lang.CharSequence, int, int, int, onig4j.OnigRegion, int)

search

protected int search(java.lang.CharSequence input,
                     int end,
                     int start,
                     int range,
                     OnigRegion region,
                     int options)
invoke onig_search() function.

Parameters:
input - The character sequence to be searched
end - The terminate index of character sequence, exclusive
start - The search start index of character sequence, inclusive
range - The search terminate index of character sequence
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The index of the first character matched

match

public int match(java.lang.CharSequence input,
                 int at)
invoke match(input, input.length(), at, null, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int at,
                 OnigRegion region)
invoke match(input, input.length(), at, region, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int at,
                 OnigOptionType... options)
invoke match(input, input.length(), at, null, options) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int at,
                 java.util.Collection<OnigOptionType> options)
invoke match(input, input.length(), at, null, options) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int at,
                 OnigRegion region,
                 OnigOptionType... options)
invoke match(input, input.length(), at, region, options) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int at,
                 OnigRegion region,
                 java.util.Collection<OnigOptionType> options)
invoke match(input, input.length(), at, region, options) method.

Parameters:
input - The character sequence to be matched
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at)
invoke match(input, end, at, null, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at,
                 OnigRegion region)
invoke match(input, end, at, region, ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at,
                 OnigOptionType... options)
invoke match(input, end, at, null, options) method.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at,
                 java.util.Collection<OnigOptionType> options)
invoke match(input, end, at, null, options) method.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at,
                 OnigRegion region,
                 OnigOptionType... options)
invoke onig_match() function.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

public int match(java.lang.CharSequence input,
                 int end,
                 int at,
                 OnigRegion region,
                 java.util.Collection<OnigOptionType> options)
invoke onig_match() function.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The matched character count
See Also:
match(java.lang.CharSequence, int, int, onig4j.OnigRegion, int)

match

protected int match(java.lang.CharSequence input,
                    int end,
                    int at,
                    OnigRegion region,
                    int options)
invoke onig_match() function.

Parameters:
input - The character sequence to be matched
end - The terminate index of character sequence, exclusive
at - The match index of character sequence
region - The region object for return group match range info (null is allowed)
options - The search time option
Returns:
The matched character count

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input)
invoke splite(input, 0, OnigOptionType.ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be split
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, onig4j.OnigOptionType...)

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                              int limit)
invoke splite(input, limit, OnigOptionType.ONIG_OPTION_NONE) method.

Parameters:
input - The character sequence to be split
limit - The result threshold, as described above
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, onig4j.OnigOptionType...)

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                              java.util.Collection<OnigOptionType> options)
invoke splite(input, 0, option) method.

Parameters:
input - The character sequence to be split
options - The search time option
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, java.util.Collection)

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                              OnigOptionType... options)
invoke splite(input, 0, option) method.

Parameters:
input - The character sequence to be split
options - The search time option
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, onig4j.OnigOptionType...)

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                              int limit,
                                              java.util.Collection<OnigOptionType> options)
Splits the given string around matches of this pattern.

Parameters:
input - The character sequence to be split
limit - The result threshold, as described above
options - The search time option
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, int)

split

public java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                              int limit,
                                              OnigOptionType... options)
Splits the given string around matches of this pattern.

Parameters:
input - The character sequence to be split
limit - The result threshold, as described above
options - The search time option
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
split(java.lang.CharSequence, int, int)

split

protected java.util.List<java.lang.String> split(java.lang.CharSequence input,
                                                 int limit,
                                                 int options)
Splits the given string around matches of this pattern.

Parameters:
input - The character sequence to be split
limit - The result threshold, as described above
options - The search time option
Returns:
The array of strings computed by splitting the input around matches of this pattern
See Also:
Pattern.split(java.lang.CharSequence, int)

nameCount

public int nameCount()
invoke onig_number_of_names() function.

Returns:
The number of names defined in the pattern (Multiple definitions of one name is counted as one)

captureCount

public int captureCount()
invoke onig_number_of_captures() function.

Returns:
The number of capture group in the pattern

captureHistoryCount

public int captureHistoryCount()
invoke onig_number_of_capture_histories() function.

Returns:
The number of capture history defined in the pattern

foreachName

public int foreachName(OnigRegex.Callback callback)
invoke onig_foreach_name() function.

Parameters:
callback - The callback object
Returns:
The callback object return value

getMatchStackLimitSize

public static int getMatchStackLimitSize()
invoke onig_get_match_stack_limit_size() function.

Returns:
the maximum number of stack size (default: 0 == unlimited)

setMatchStackLimitSize

public static void setMatchStackLimitSize(int size)
invoke onig_set_match_stack_limit_size() function.

Parameters:
size - the maximum number of stack size (size = 0: unlimited)

getVersion

public static java.lang.String getVersion()
invoke onig_version() function.

Returns:
The version string. (ex. "5.9.1")

getErrorMessage

public static java.lang.String getErrorMessage(int ecode,
                                               java.lang.String param)
invoke onig_error_code_to_str() function.

Parameters:
ecode - The error code returned by other API functions.
param - The parameter value (null is allowed)
Returns:
The error message string

setWarningListener

public static boolean setWarningListener(OnigRegex.WarningListener listener)
invoke onig_set_warn_func() function.

Parameters:
listener - The warning message listener object
Returns:
true if it's successful

clearWarningListener

public static void clearWarningListener()
clear onig_set_warn_func() listener object.


setVerboseWarningListener

public static boolean setVerboseWarningListener(OnigRegex.WarningListener listener)
invoke onig_set_verb_warn_func() function.

Parameters:
listener - The warning message listener object
Returns:
true if it's successful

clearVerboseWarningListener

public static void clearVerboseWarningListener()
clear onig_set_verb_warn_func() listener object.


fireWarning

protected static void fireWarning(java.lang.String msg)

fireWarningVerbose

protected static void fireWarningVerbose(java.lang.String msg)

isSyntaxError

public static boolean isSyntaxError(int ecode)
This method is in stead of ONIG_IS_PATTERN_ERROR() macro.

Parameters:
ecode - The return code
Returns:
true if the ecode is syntax error

close

public final void close()
invoke free() method.

Specified by:
close in interface java.io.Closeable
See Also:
free()

finalize

protected final void finalize()
                       throws java.lang.Throwable
invoke close() method.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable
See Also:
close()