|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | 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 (src)
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 (src) test,
ObjectName (src) pattern)
Compare an object name against a pattern. |
static boolean |
patternMatch(java.lang.String test,
java.lang.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 (src) test, ObjectName (src) pattern)
test
- the string to testpattern
- the pattern to matchpublic static boolean patternMatch(java.lang.String test, java.lang.String pattern)
test
- the string to testpattern
- the pattern to matchpublic 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 (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |