|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.core.model.CoreModelUtil
public class CoreModelUtil
Constructor Summary | |
---|---|
CoreModelUtil()
|
Method Summary | |
---|---|
static int |
indexOf(char toBeFound,
char[] array)
Answers the first index in the array for which the corresponding character is equal to toBeFound. |
static int |
indexOf(char toBeFound,
char[] array,
int start)
Answers the first index in the array for which the corresponding character is equal to toBeFound starting the search at index start. |
static boolean |
isExcluded(IResource resource,
char[][] exclusionPatterns)
|
static boolean |
isExcludedPath(IPath resourcePath,
IPath[] exclusionPatterns)
|
static boolean |
match(char[] pattern,
char[] name,
boolean isCaseSensitive)
Answers true if the pattern matches the given name, false otherwise. |
static boolean |
match(char[] pattern,
int patternStart,
int patternEnd,
char[] name,
int nameStart,
int nameEnd,
boolean isCaseSensitive)
Answers true if the a sub-pattern matches the subpart of the given name, false otherwise. char[] pattern matching, accepting wild-cards '*' and '?'. |
static boolean |
pathMatch(char[] pattern,
char[] filepath,
boolean isCaseSensitive,
char pathSeparator)
Answers true if the pattern matches the filepath using the pathSepatator, false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoreModelUtil()
Method Detail |
---|
public static boolean isExcludedPath(IPath resourcePath, IPath[] exclusionPatterns)
public static final boolean isExcluded(IResource resource, char[][] exclusionPatterns)
public static final boolean match(char[] pattern, char[] name, boolean isCaseSensitive)
pattern = { '?', 'b', '*' } name = { 'a', 'b', 'c' , 'd' } isCaseSensitive = true result => true
pattern = { '?', 'b', '?' } name = { 'a', 'b', 'c' , 'd' } isCaseSensitive = true result => false
pattern = { 'b', '*' } name = { 'a', 'b', 'c' , 'd' } isCaseSensitive = true result => false
pattern
- the given patternname
- the given nameisCaseSensitive
- flag to know whether or not the matching should be case sensitive
public static final boolean match(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd, boolean isCaseSensitive)
pattern = { '?', 'b', '*' } patternStart = 1 patternEnd = 3 name = { 'a', 'b', 'c' , 'd' } nameStart = 1 nameEnd = 4 isCaseSensitive = true result => true
pattern = { '?', 'b', '*' } patternStart = 1 patternEnd = 2 name = { 'a', 'b', 'c' , 'd' } nameStart = 1 nameEnd = 2 isCaseSensitive = true result => false
pattern
- the given patternpatternStart
- the given pattern startpatternEnd
- the given pattern endname
- the given namenameStart
- the given name startnameEnd
- the given name endisCaseSensitive
- flag to know if the matching should be case sensitive
public static final boolean pathMatch(char[] pattern, char[] filepath, boolean isCaseSensitive, char pathSeparator)
pattern
- the given patternfilepath
- the given pathisCaseSensitive
- to find out whether or not the matching should be case sensitivepathSeparator
- the given path separator
public static final int indexOf(char toBeFound, char[] array)
toBeFound = 'c' array = { ' a', 'b', 'c', 'd' } result => 2
toBeFound = 'e' array = { ' a', 'b', 'c', 'd' } result => -1
toBeFound
- the character to searcharray
- the array to be searched
NullPointerException
- if array is nullpublic static final int indexOf(char toBeFound, char[] array, int start)
toBeFound = 'c' array = { ' a', 'b', 'c', 'd' } start = 2 result => 2
toBeFound = 'c' array = { ' a', 'b', 'c', 'd' } start = 3 result => -1
toBeFound = 'e' array = { ' a', 'b', 'c', 'd' } start = 1 result => -1
toBeFound
- the character to searcharray
- the array to be searchedstart
- the starting index
NullPointerException
- if array is null
ArrayIndexOutOfBoundsException
- if start is lower than 0
|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |