Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.obfuscator.modules
Class MultiIdentifierMatcher

java.lang.Object
  extended bynet.sf.jode.obfuscator.modules.MultiIdentifierMatcher
All Implemented Interfaces:
IdentifierMatcher, OptionHandler

public class MultiIdentifierMatcher
extends java.lang.Object
implements IdentifierMatcher, OptionHandler


Field Summary
static boolean AND
          Useful constant for giving to the constructor.
static boolean OR
          Useful constant for giving to the constructor.
 
Constructor Summary
MultiIdentifierMatcher()
          Create an empty MultiIdentifierMatcher.
MultiIdentifierMatcher(boolean isOr, IdentifierMatcher[] matchers)
          Create an IdentifierMatcher out of other matchers.
 
Method Summary
 java.lang.String getNextComponent(Identifier ident)
          Returns the unique name of the single sub item, for which matches or matchesSub returns true.
 boolean matches(Identifier ident)
          Returns true, if the ident is matched by this matcher.
 boolean matchesSub(Identifier ident, java.lang.String name)
          Returns true, if there may be a sub ident, that is matched by this matcher.
 void setOption(java.lang.String option, java.util.Collection values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OR

public static boolean OR
Useful constant for giving to the constructor.


AND

public static boolean AND
Useful constant for giving to the constructor.

Constructor Detail

MultiIdentifierMatcher

public MultiIdentifierMatcher()
Create an empty MultiIdentifierMatcher.


MultiIdentifierMatcher

public MultiIdentifierMatcher(boolean isOr,
                              IdentifierMatcher[] matchers)
Create an IdentifierMatcher out of other matchers.

Parameters:
isOr - if true, match should return the logical (shortcut) or of the underlying matchers, if false it returns the logical and.
matchers - the underlying matchers
Method Detail

setOption

public void setOption(java.lang.String option,
                      java.util.Collection values)
Specified by:
setOption in interface OptionHandler

matches

public boolean matches(Identifier ident)
Description copied from interface: IdentifierMatcher
Returns true, if the ident is matched by this matcher.

Specified by:
matches in interface IdentifierMatcher

matchesSub

public boolean matchesSub(Identifier ident,
                          java.lang.String name)
Description copied from interface: IdentifierMatcher
Returns true, if there may be a sub ident, that is matched by this matcher.

Specified by:
matchesSub in interface IdentifierMatcher
Parameters:
name - the name of the sub ident, or null if every name is okay.

getNextComponent

public java.lang.String getNextComponent(Identifier ident)
Description copied from interface: IdentifierMatcher
Returns the unique name of the single sub item, for which matches or matchesSub returns true.

Specified by:
getNextComponent in interface IdentifierMatcher
Returns:
the unique name, or null, if there is not a unique sub item.

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.