Enum Class JavaKeyword
- All Implemented Interfaces:
Serializable,Comparable<JavaKeyword>,Constable
Java keywords and reserved tokens.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionabstractkeyword.assertkeyword.booleankeyword.breakkeyword.bytekeyword.casekeyword.catchkeyword.charkeyword.classkeyword.constreserved keyword.continuekeyword.defaultkeyword.dokeyword.doublekeyword.elsekeyword.enumkeyword.extendskeyword.falseliteral.finalkeyword.finallykeyword.floatkeyword.forkeyword.gotoreserved keyword.ifkeyword.implementskeyword.importkeyword.instanceofkeyword.intkeyword.interfacekeyword.longkeyword.nativekeyword.newkeyword.nullliteral.packagekeyword.privatekeyword.protectedkeyword.publickeyword.returnkeyword.shortkeyword.statickeyword.strictfpkeyword.superkeyword.switchkeyword.synchronizedkeyword.thiskeyword.throwkeyword.throwskeyword.transientkeyword.trueliteral.trykeyword.voidkeyword.volatilekeyword.whilekeyword. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendAccessKeyword(JavaOutputSink out, JavaKeyword keyword) Generate a Java keyword into an AST sink.static voidgenerateAccessFlags(JavaOutputSink out, int f, int addFinalSpace, int entityType) Generate some Java flags into an AST sink.static voidgenerateClassAccessFlags(JavaOutputSink out, int f, int add_final_space) Generate class access flags into an output sink.static voidgenerateFieldAccessFlags(JavaOutputSink out, int f, int add_final_space) Generate field access flags into an output sink.static voidgenerateMethodAccessFlags(JavaOutputSink out, int f, int add_final_space) Generate method access flags into an output sink.static JavaKeywordReturns the enum constant of this class with the specified name.static JavaKeyword[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ABSTRACT
abstractkeyword. -
ASSERT
assertkeyword. -
BOOLEAN
booleankeyword. -
BREAK
breakkeyword. -
BYTE
bytekeyword. -
CASE
casekeyword. -
CATCH
catchkeyword. -
CHAR
charkeyword. -
CLASS
classkeyword. -
CONST
constreserved keyword. -
CONTINUE
continuekeyword. -
DEFAULT
defaultkeyword. -
DO
dokeyword. -
DOUBLE
doublekeyword. -
ELSE
elsekeyword. -
ENUM
enumkeyword. -
EXTENDS
extendskeyword. -
FINAL
finalkeyword. -
FINALLY
finallykeyword. -
FLOAT
floatkeyword. -
FOR
forkeyword. -
GOTO
gotoreserved keyword. -
IF
ifkeyword. -
IMPLEMENTS
implementskeyword. -
IMPORT
importkeyword. -
INSTANCEOF
instanceofkeyword. -
INT
intkeyword. -
INTERFACE
interfacekeyword. -
LONG
longkeyword. -
NATIVE
nativekeyword. -
NEW
newkeyword. -
PACKAGE
packagekeyword. -
PRIVATE
privatekeyword. -
PROTECTED
protectedkeyword. -
PUBLIC
publickeyword. -
RETURN
returnkeyword. -
SHORT
shortkeyword. -
STATIC
statickeyword. -
STRICTFP
strictfpkeyword. -
SUPER
superkeyword. -
SWITCH
switchkeyword. -
SYNCHRONIZED
synchronizedkeyword. -
THIS
thiskeyword. -
THROW
throwkeyword. -
THROWS
throwskeyword. -
TRANSIENT
transientkeyword. -
TRY
trykeyword. -
VOID
voidkeyword. -
VOLATILE
volatilekeyword. -
WHILE
whilekeyword. -
TRUE
trueliteral. -
FALSE
falseliteral. -
NULL
nullliteral.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
generateClassAccessFlags
Generate class access flags into an output sink.- Parameters:
out- output sinkf- flags, as defined inJavaFlagsadd_final_space- final-space behavior
-
generateFieldAccessFlags
Generate field access flags into an output sink.- Parameters:
out- output sinkf- flags, as defined inJavaFlagsadd_final_space- final-space behavior
-
generateMethodAccessFlags
Generate method access flags into an output sink.- Parameters:
out- output sinkf- flags, as defined inJavaFlagsadd_final_space- final-space behavior
-
generateAccessFlags
public static void generateAccessFlags(JavaOutputSink out, int f, int addFinalSpace, int entityType) Generate some Java flags into an AST sink.- Parameters:
out- output sinkf- flags, as defined inJavaFlagsaddFinalSpace- 0=no final space; 1=always append a trailing space; -1=append a trailing space only if the access flags string is not emptyentityType- the type entity that these access flags apply to: 0=class, 1=field, 2=method
-
appendAccessKeyword
Generate a Java keyword into an AST sink.- Parameters:
out- output sinkkeyword- keyword to append
-