public boolean isMatchingName ( String uri , String localPart ) { // check and normalize arguments if ( localPart == null ) throw new IllegalArgumentException ( "need non-null localPart" ) ; if ( uri != null && uri . equals ( "" ) ) uri = null ; // split name into uri/localPart if we haven't done so already if ( this . localPart == null && this . uri == null ) parseStepName ( ) ; // generic wildcard if ( this . uri == null && this . localPart . equals ( "*" ) ) return true ; // match will null namespace if ( uri == null && this . uri == null && localPart . equals ( this . localPart ) ) return true ; if ( uri != null && this . uri != null && uri . equals ( this . uri ) ) { // exact match if ( localPart . equals ( this . localPart ) ) return true ; // namespace-specific wildcard if ( this . localPart . equals ( "*" ) ) return true ; } // no match return false ; }
Returns true if the given name matches the Step object s name taking into account the Step object s wildcards ; returns false otherwise .