|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.mx.util.ObjectNamePatternHelper
ObjectName pattern matching Helper.
Contains various routines for matching domains and properties.
Routines based on work done Trevor in the registry.
| Nested Class Summary | |
static class |
ObjectNamePatternHelper.PropertyPattern
Encapsulation of property information |
| Constructor Summary | |
ObjectNamePatternHelper()
|
|
| Method Summary | |
static boolean |
patternMatch(char[] test,
int tpos,
char[] pattern,
int ppos)
Compare where ? and * chars are significant. |
static boolean |
patternMatch(ObjectName test,
ObjectName pattern)
Compare an object name against a pattern. |
static boolean |
patternMatch(String test,
String pattern)
Compare strings where ? and * chars are significant. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ObjectNamePatternHelper()
| Method Detail |
public static boolean patternMatch(ObjectName test, ObjectName pattern)
test - the string to testpattern - the pattern to matchpublic static boolean patternMatch(String test, String pattern)
test - the string to testpattern - the pattern to match
public static boolean patternMatch(char[] test,
int tpos,
char[] pattern,
int ppos)
I arrived at this solution after quite a bit of trial and error - it's all a bit interwoven. Obviously I'm no good at parsers and there must be a clearer or more elegant way to do this. I'm suitably in awe of the perl regex hackers now.
test - the string to testtpos - the start of the test stringpattern - the pattern to matchppos - the start of the pattern string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||