|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object polyglot.types.Flags
public class Flags
Flags
is an immutable set of class, method, or field modifiers.
We represent package scope as the absence of private, public and protected
scope modifiers.
Field Summary | |
---|---|
static Flags |
ABSTRACT
|
protected static Flags |
ACCESS_FLAGS
All access flags. |
protected long |
bits
Bit set use to implement a flag set. |
static Flags |
FINAL
|
static Flags |
INTERFACE
|
static Flags |
NATIVE
|
static Flags |
NONE
|
static Flags |
PRIVATE
|
static Flags |
PROTECTED
|
static Flags |
PUBLIC
|
static Flags |
STATIC
|
static Flags |
STRICTFP
|
static Flags |
SYNCHRONIZED
|
static Flags |
TRANSIENT
|
static Flags |
VOLATILE
|
Constructor Summary | |
---|---|
protected |
Flags(long bits)
Effects: returns a new accessflags object with no accessflags set. |
Method Summary | |
---|---|
Flags |
Abstract()
Return a copy of this this with the abstract
flag set. |
Flags |
clear(Flags other)
Create new flags with the flags in other cleared. |
Flags |
clearAbstract()
Return a copy of this this with the abstract
flag clear. |
Flags |
clearFinal()
Return a copy of this this with the final
flag clear. |
Flags |
clearInterface()
Return a copy of this this with the interface
flag clear. |
Flags |
clearNative()
Return a copy of this this with the native
flag clear. |
Flags |
clearPrivate()
Return a copy of this this with the private
flag clear. |
Flags |
clearProtected()
Return a copy of this this with the protected
flag clear. |
Flags |
clearPublic()
Return a copy of this this with the public
flag clear. |
Flags |
clearStatic()
Return a copy of this this with the static
flag clear. |
Flags |
clearStrictFP()
Return a copy of this this with the strictfp
flag clear. |
Flags |
clearSynchronized()
Return a copy of this this with the
synchronized flag clear. |
Flags |
clearTransient()
Return a copy of this this with the transient
flag clear. |
Flags |
clearVolatile()
Return a copy of this this with the volatile
flag clear. |
boolean |
contains(Flags other)
Check if all flags in other are set. |
static Flags |
createFlag(java.lang.String name,
Flags after)
Return a new Flags object with a new name. |
static Flags |
createFlag(java.lang.String name,
java.lang.String cHeadName,
java.lang.String cBodyName,
Flags after)
Return a new Flags object with a new name. |
boolean |
equals(java.lang.Object o)
|
Flags |
Final()
Return a copy of this this with the final
flag set. |
int |
hashCode()
|
Flags |
Interface()
Return a copy of this this with the interface
flag set. |
boolean |
intersects(Flags other)
Check if any flags in other are set. |
boolean |
isAbstract()
Return true if this has the abstract flag set. |
boolean |
isFinal()
Return true if this has the final flag set. |
boolean |
isInterface()
Return true if this has the interface flag set. |
boolean |
isNative()
Return true if this has the native flag set. |
boolean |
isPackage()
Return true if this has the no access flags
(public , private , protected ) set. |
boolean |
isPrivate()
Return true if this has the private flag set. |
boolean |
isProtected()
Return true if this has the protected flag set. |
boolean |
isPublic()
Return true if this has the public flag set. |
boolean |
isStatic()
Return true if this has the static flag set. |
boolean |
isStrictFP()
Return true if this has the strictfp flag set. |
boolean |
isSynchronized()
Return true if this has the synchronized flag
set. |
boolean |
isTransient()
Return true if this has the transient flag set. |
boolean |
isVolatile()
Return true if this has the volatile flag set. |
boolean |
moreRestrictiveThan(Flags f)
Return true if this has more restrictive access flags than
f . |
Flags |
Native()
Return a copy of this this with the native
flag set. |
Flags |
Package()
Return a copy of this this with no access flags
(public , private , protected ) set. |
Flags |
Private()
Return a copy of this this with the private
flag set. |
Flags |
Protected()
Return a copy of this this with the protected
flag set. |
Flags |
Public()
Return a copy of this this with the public
flag set. |
Flags |
retain(Flags other)
Create new flags with only flags in other set. |
Flags |
set(Flags other)
Create new flags with the flags in other also set. |
Flags |
Static()
Return a copy of this this with the static
flag set. |
Flags |
StrictFP()
Return a copy of this this with the strictfp
flag set. |
Flags |
Synchronized()
Return a copy of this this with the
synchronized flag set. |
java.lang.String |
toString()
|
Flags |
Transient()
Return a copy of this this with the transient
flag set. |
java.lang.String |
translate()
Return "" if no flags set, or toString() + " " if some flags are set. |
java.lang.String |
translateCBody()
Returns the flag information appropriate for C++ functions |
java.lang.String |
translateCHead()
Returns the flag information appropriate for C++ header files |
Flags |
Volatile()
Return a copy of this this with the volatile
flag set. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Flags NONE
public static final Flags PUBLIC
public static final Flags PRIVATE
public static final Flags PROTECTED
public static final Flags STATIC
public static final Flags FINAL
public static final Flags SYNCHRONIZED
public static final Flags TRANSIENT
public static final Flags NATIVE
public static final Flags INTERFACE
public static final Flags ABSTRACT
public static final Flags VOLATILE
public static final Flags STRICTFP
protected static final Flags ACCESS_FLAGS
protected long bits
Constructor Detail |
---|
protected Flags(long bits)
Method Detail |
---|
public static Flags createFlag(java.lang.String name, Flags after)
name
- the name of the new flag in Javaafter
- the flags after which this flag should be printed;
Flags.NONE to print before all other flags, null
if we should print at the end.public static Flags createFlag(java.lang.String name, java.lang.String cHeadName, java.lang.String cBodyName, Flags after)
name
- the name of the new flag in JavacHeadName
- the name of the flag to print in the C++ header filecBodyName
- the name of the flag to print in the C++ body fileafter
- the flags after which this flag should be printed;
Flags.NONE to print before all other flags, null
if we should print at the end.public Flags set(Flags other)
other
also set.
public Flags clear(Flags other)
other
cleared.
public Flags retain(Flags other)
other
set.
public boolean intersects(Flags other)
other
are set.
public boolean contains(Flags other)
other
are set.
public Flags Public()
this
with the public
flag set.
public Flags clearPublic()
this
with the public
flag clear.
public boolean isPublic()
this
has the public
flag set.
public Flags Private()
this
with the private
flag set.
public Flags clearPrivate()
this
with the private
flag clear.
public boolean isPrivate()
this
has the private
flag set.
public Flags Protected()
this
with the protected
flag set.
public Flags clearProtected()
this
with the protected
flag clear.
public boolean isProtected()
this
has the protected
flag set.
public Flags Package()
this
with no access flags
(public
, private
, protected
) set.
public boolean isPackage()
this
has the no access flags
(public
, private
, protected
) set.
public Flags Static()
this
with the static
flag set.
public Flags clearStatic()
this
with the static
flag clear.
public boolean isStatic()
this
has the static
flag set.
public Flags Final()
this
with the final
flag set.
public Flags clearFinal()
this
with the final
flag clear.
public boolean isFinal()
this
has the final
flag set.
public Flags Synchronized()
this
with the
synchronized
flag set.
public Flags clearSynchronized()
this
with the
synchronized
flag clear.
public boolean isSynchronized()
this
has the synchronized
flag
set.
public Flags Transient()
this
with the transient
flag set.
public Flags clearTransient()
this
with the transient
flag clear.
public boolean isTransient()
this
has the transient
flag set.
public Flags Native()
this
with the native
flag set.
public Flags clearNative()
this
with the native
flag clear.
public boolean isNative()
this
has the native
flag set.
public Flags Interface()
this
with the interface
flag set.
public Flags clearInterface()
this
with the interface
flag clear.
public boolean isInterface()
this
has the interface
flag set.
public Flags Abstract()
this
with the abstract
flag set.
public Flags clearAbstract()
this
with the abstract
flag clear.
public boolean isAbstract()
this
has the abstract
flag set.
public Flags Volatile()
this
with the volatile
flag set.
public Flags clearVolatile()
this
with the volatile
flag clear.
public boolean isVolatile()
this
has the volatile
flag set.
public Flags StrictFP()
this
with the strictfp
flag set.
public Flags clearStrictFP()
this
with the strictfp
flag clear.
public boolean isStrictFP()
this
has the strictfp
flag set.
public boolean moreRestrictiveThan(Flags f)
this
has more restrictive access flags than
f
.
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String translate()
public java.lang.String translateCBody()
public java.lang.String translateCHead()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |