Jode 1.90-CVS
Build Aug 6, 2004

net.sf.jode.obfuscator.modules
Class ModifierMatcher

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

public class ModifierMatcher
extends java.lang.Object
implements IdentifierMatcher, OptionHandler, java.lang.Cloneable


Field Summary
static ModifierMatcher allowAll
           
static ModifierMatcher denyAll
           
 
Constructor Summary
ModifierMatcher()
           
ModifierMatcher(int and, int xor)
           
 
Method Summary
 ModifierMatcher and(ModifierMatcher mm)
           
 java.lang.Object clone()
           
 ModifierMatcher forbidAccess(int accessModif, boolean andAbove)
           
 ModifierMatcher forbidModifier(int modifier)
           
 ModifierMatcher forceAccess(int accessModif, boolean andAbove)
          Creates a new ModifierMatcher, that matches only modifiers, we also match and also forces the access rights, to be accessModif (or less restrictive).
 ModifierMatcher forceModifier(int modifier)
           
 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 matches(int modifiers)
           
 boolean matchesSub(Identifier ident, java.lang.String name)
          Returns true, if there may be a sub ident, that is matched by this matcher.
 ModifierMatcher or(ModifierMatcher mm)
           
 void setOption(java.lang.String option, java.util.Collection values)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

denyAll

public static ModifierMatcher denyAll

allowAll

public static ModifierMatcher allowAll
Constructor Detail

ModifierMatcher

public ModifierMatcher()

ModifierMatcher

public ModifierMatcher(int and,
                       int xor)
Method Detail

setOption

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

and

public ModifierMatcher and(ModifierMatcher mm)

or

public ModifierMatcher or(ModifierMatcher mm)

forceAccess

public ModifierMatcher forceAccess(int accessModif,
                                   boolean andAbove)
Creates a new ModifierMatcher, that matches only modifiers, we also match and also forces the access rights, to be accessModif (or less restrictive).

Parameters:
accessModif - the access modifier. Use 0 for package access, or Modifier.PRIVATE/PROTECTED/PUBLIC.
andAbove - allow to be less restrictive.
Returns:
a new modifier matcher that will also use the given accesses.

forbidAccess

public ModifierMatcher forbidAccess(int accessModif,
                                    boolean andAbove)

forceModifier

public final ModifierMatcher forceModifier(int modifier)

forbidModifier

public final ModifierMatcher forbidModifier(int modifier)

matches

public final boolean matches(int modifiers)

matches

public final 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 final 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 final 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.

clone

public java.lang.Object clone()

Jode 1.90-CVS
Build Aug 6, 2004

Copyright © 1998-2004 by Jochen Hoenicke.