org.exolab.javasource

Class JModifiers

public final class JModifiers extends Object

Represents the set of modifiers for a Method or Member variable.

Version: $Revision: 6324 $ $Date: 2005-02-26 17:30:28 -0700 (Sat, 26 Feb 2005) $

Author: Keith Visco

Constructor Summary
JModifiers()
Creates a new JModifiers class.
Method Summary
JModifierscopy()
Creates a copy of this JModifiers instance.
booleanisAbstract()
Returns true if this JModifiers includes the qualifier "abstract".
booleanisFinal()
Returns true if this JModifiers includes the qualifier "final".
booleanisPackage()
Returns true if the visibility modifier for this JModifier is package (i.e., without qualifier).
booleanisPrivate()
Returns true if the visibility modifier for this JModifier is "private".
booleanisProtected()
Returns true if the visibility modifier for this JModifier is "protected".
booleanisPublic()
Returns true if the visibility modifier for this JModifier is "public".
booleanisStatic()
Returns true if this JModifier includes the qualifier "static".
booleanisTransient()
Returns true if this JModifier includes the qualifier "transient".
voidmakePackage()
Changes the visibility qualifier to package (= without qualifier).
voidmakePrivate()
Changes the visibility qualifier to "private".
voidmakeProtected()
Changes the visibility qualifier to "protected".
voidmakePublic()
Changes the visibility qualifier to "public".
voidsetAbstract(boolean isAbstract)
Sets whether or not this JModifiers includes the qualifier "abstract".
voidsetFinal(boolean isFinal)
Sets whether or not this JModifiers includes the qualifier "final".
voidsetStatic(boolean isStatic)
Sets whether or not this JModifiers includes the qualifier "static".
voidsetTransient(boolean isTransient)
Sets whether or not this JModifiers includes the qualifier "transient".
StringtoString()
Returns the String represetation of this JModifiers, in the order recommended by the Java Language Specification.

Constructor Detail

JModifiers

public JModifiers()
Creates a new JModifiers class. By default the only modifier present is public.

Method Detail

copy

public JModifiers copy()
Creates a copy of this JModifiers instance.

Returns: a copy of this JModifiers.

isAbstract

public boolean isAbstract()
Returns true if this JModifiers includes the qualifier "abstract". This is only applicable to methods and classes.

Returns: true if this JModifiers includes the qualifier "abstract". This is only applicable to methods and classes.

isFinal

public boolean isFinal()
Returns true if this JModifiers includes the qualifier "final". This is only applicable to methods and classes.

Returns: true if this JModifiers includes the qualifier "final". This is only applicable to methods and classes.

isPackage

public boolean isPackage()
Returns true if the visibility modifier for this JModifier is package (i.e., without qualifier).

Returns: true if the visibility modifier for this JModifier is package (i.e., without qualifier).

isPrivate

public boolean isPrivate()
Returns true if the visibility modifier for this JModifier is "private".

Returns: true if the visibility modifier for this JModifier is "private".

isProtected

public boolean isProtected()
Returns true if the visibility modifier for this JModifier is "protected".

Returns: true if the visibility modifier for this JModifier is "protected".

isPublic

public boolean isPublic()
Returns true if the visibility modifier for this JModifier is "public".

Returns: true if the visibility modifier for this JModifier is "public".

isStatic

public boolean isStatic()
Returns true if this JModifier includes the qualifier "static".

Returns: true if this JModifier includes the qualifier "static".

isTransient

public boolean isTransient()
Returns true if this JModifier includes the qualifier "transient".

Returns: true if this JModifier includes the qualifier "transient".

makePackage

public void makePackage()
Changes the visibility qualifier to package (= without qualifier).

makePrivate

public void makePrivate()
Changes the visibility qualifier to "private".

makeProtected

public void makeProtected()
Changes the visibility qualifier to "protected".

makePublic

public void makePublic()
Changes the visibility qualifier to "public".

setAbstract

public void setAbstract(boolean isAbstract)
Sets whether or not this JModifiers includes the qualifier "abstract". This applies only to methods or classes.

Parameters: isAbstract if true, indicates that this JModifier should include the qualifier "abstract"

setFinal

public void setFinal(boolean isFinal)
Sets whether or not this JModifiers includes the qualifier "final".

Parameters: isFinal if true, indicates that this JModifier should include the qualifier "final"

setStatic

public void setStatic(boolean isStatic)
Sets whether or not this JModifiers includes the qualifier "static".

Parameters: isStatic if true, indicates that this JModifier should include the qualifier "static"

setTransient

public void setTransient(boolean isTransient)
Sets whether or not this JModifiers includes the qualifier "transient".

Parameters: isTransient is a boolean which when true indicates that this JModifier should include the qualifier "transient"

toString

public String toString()
Returns the String represetation of this JModifiers, in the order recommended by the Java Language Specification.

Returns: the String represetation of this JModifiers.

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com