openjava.mop
Class OJModifier

java.lang.Object
  |
  +--openjava.mop.OJModifier

public class OJModifier
extends Object

The class OJModifier extends java.lang.relfect.Modifier to support user defined keywords.

Since:
%SOFTWARE% 1.0
Version:
1.0
Author:
Michiaki Tatsubori
See Also:
Modifier

Field Summary
private static OJModifier _constantEmpty
           
static int ABSTRACT
           
private static int ACCESS
           
static int FINAL
           
private static int INHERIT
           
static int INTERFACE
           
private  int javaModifier
           
static int NATIVE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int STATIC
           
static int SYNCHRONIZED
           
static int TRANSIENT
           
private  String[] userModifiers
           
static int VOLATILE
           
 
Constructor Summary
(package private) OJModifier(int mod)
           
(package private) OJModifier(int mod, String[] user_modifs)
           
 
Method Summary
 OJModifier add(int mods)
           
static OJModifier constantEmpty()
           
static OJModifier forModifier(int mod)
           
static OJModifier forParseTree(ModifierList ptree)
           
 boolean has(String str)
           
 boolean isAbstract()
          Returns true if this modifier includes the abstract modifier.
 boolean isFinal()
          Returns true if this modifier includes the final modifier.
 boolean isInterface()
          Returns true if this modifier includes the interface modifier.
 boolean isNative()
          Returns true if this modifier includes the native modifier.
 boolean isPrivate()
          Returns true if this modifier includes the private modifier.
 boolean isProtected()
          Returns true if this modifier includes the protected modifier.
 boolean isPublic()
          Returns true if this modifier includes the public modifier.
 boolean isStatic()
          Returns true if this modifier includes the static modifier.
 boolean isSynchronized()
          Returns true if this modifier includes the synchronized modifier.
 boolean isTransient()
          Returns true if this modifier includes the transient modifier.
 boolean isVolatile()
          Returns true if this modifier includes the volatile modifier.
 OJModifier remove(int mods)
           
private  int removedModifier(int mods)
           
 OJModifier setAbstract()
           
 OJModifier setFinal()
           
 OJModifier setPackaged()
           
 OJModifier setPrivate()
           
 OJModifier setProtected()
           
 OJModifier setPublic()
           
 int toModifier()
          Returns the specifier int for modifiers in regular Java.
 String toString()
          Generates a string describing the access modifier flags without user modifiers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

STATIC

public static final int STATIC
See Also:
Constant Field Values

FINAL

public static final int FINAL
See Also:
Constant Field Values

SYNCHRONIZED

public static final int SYNCHRONIZED
See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
See Also:
Constant Field Values

TRANSIENT

public static final int TRANSIENT
See Also:
Constant Field Values

NATIVE

public static final int NATIVE
See Also:
Constant Field Values

INTERFACE

public static final int INTERFACE
See Also:
Constant Field Values

ABSTRACT

public static final int ABSTRACT
See Also:
Constant Field Values

javaModifier

private int javaModifier

userModifiers

private String[] userModifiers

_constantEmpty

private static OJModifier _constantEmpty

ACCESS

private static final int ACCESS
See Also:
Constant Field Values

INHERIT

private static final int INHERIT
See Also:
Constant Field Values
Constructor Detail

OJModifier

OJModifier(int mod)

OJModifier

OJModifier(int mod,
           String[] user_modifs)
Method Detail

constantEmpty

public static final OJModifier constantEmpty()

toModifier

public int toModifier()
Returns the specifier int for modifiers in regular Java.

Returns:
integer specifier
See Also:
Modifier

forModifier

public static OJModifier forModifier(int mod)

forParseTree

public static OJModifier forParseTree(ModifierList ptree)

isPublic

public final boolean isPublic()
Returns true if this modifier includes the public modifier.


isPrivate

public final boolean isPrivate()
Returns true if this modifier includes the private modifier.


isProtected

public final boolean isProtected()
Returns true if this modifier includes the protected modifier.


isStatic

public final boolean isStatic()
Returns true if this modifier includes the static modifier.


isFinal

public final boolean isFinal()
Returns true if this modifier includes the final modifier.


isSynchronized

public final boolean isSynchronized()
Returns true if this modifier includes the synchronized modifier.


isVolatile

public final boolean isVolatile()
Returns true if this modifier includes the volatile modifier.


isTransient

public final boolean isTransient()
Returns true if this modifier includes the transient modifier.


isNative

public final boolean isNative()
Returns true if this modifier includes the native modifier.


isInterface

public final boolean isInterface()
Returns true if this modifier includes the interface modifier.


isAbstract

public final boolean isAbstract()
Returns true if this modifier includes the abstract modifier.


has

public final boolean has(String str)

toString

public String toString()
Generates a string describing the access modifier flags without user modifiers. For example:
    public final synchronized
    private transient volatile
 
The modifier names are return in canonical order, as specified by The Java Language Specification.

Overrides:
toString in class Object

add

public OJModifier add(int mods)

remove

public OJModifier remove(int mods)

removedModifier

private final int removedModifier(int mods)

setPublic

public OJModifier setPublic()

setProtected

public OJModifier setProtected()

setPrivate

public OJModifier setPrivate()

setPackaged

public OJModifier setPackaged()

setAbstract

public OJModifier setAbstract()

setFinal

public OJModifier setFinal()

SourceForge.net_Logo