Answers true if a sub-pattern matches the sub-part of the given name using
CamelCase rules, or false otherwise. char[] CamelCase matching does NOT
accept explicit wild-cards '*' and '?' and is inherently case sensitive.
Can match only subset of name/pattern, considering end positions as non-inclusive.
The sub-pattern is defined by the patternStart and patternEnd positions.
CamelCase denotes the convention of writing compound names without spaces,
and capitalizing every term. This function recognizes both upper and lower
CamelCase, depending whether the leading character is capitalized or not.
The leading part of an upper CamelCase pattern is assumed to contain a
sequence of capitals which are appearing in the matching name; e.g. 'NPE' will
match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern
uses a lowercase first character. In Java, type names follow the upper
CamelCase convention, whereas method or field names follow the lower
CamelCase convention.
The pattern may contain lowercase characters, which will be matched in a case
sensitive way. These characters must appear in sequence in the name.
For instance, 'NPExcep' will match 'NullPointerException', but not
'NullPointerExCEPTION' or 'NuPoEx' will match 'NullPointerException', but not
'NoPointerException'.
Digit characters are treated in a special way. They can be used in the pattern
but are not always considered as leading character. For instance, both
'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'.
Digit characters are treated in a special way. They can be used in the pattern
but are not always considered as leading character. For instance, both
'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'.
Using this method allows matching names to have more parts than the specified
pattern (see
#camelCaseMatch(String,int,int,String,int,int,boolean)).
For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap',
'HatMapper' and also 'HashMapEntry'.
Examples:
- pattern = "NPE"
patternStart = 0
patternEnd = 3
name = NullPointerException
nameStart = 0
nameEnd = 20
result => true
- pattern = "NPE"
patternStart = 0
patternEnd = 3
name = NoPermissionException
nameStart = 0
nameEnd = 21
result => true
- pattern = "NuPoEx"
patternStart = 0
patternEnd = 6
name = NullPointerException
nameStart = 0
nameEnd = 20
result => true
- pattern = "NuPoEx"
patternStart = 0
patternEnd = 6
name = NoPermissionException
nameStart = 0
nameEnd = 21
result => false
- pattern = "npe"
patternStart = 0
patternEnd = 3
name = NullPointerException
nameStart = 0
nameEnd = 20
result => false
- pattern = "IPL3"
patternStart = 0
patternEnd = 3
name = "IPerspectiveListener3"
nameStart = 0
nameEnd = 21
result => true
- pattern = "HM"
patternStart = 0
patternEnd = 2
name = "HashMapEntry"
nameStart = 0
nameEnd = 12
result => true
- pattern = "HMap"
patternStart = 0
patternEnd = 4
name = "HatMapper"
nameStart = 0
nameEnd = 9
result => true