Package org.codehaus.groovy.syntax

# Class Types

java.lang.Object
org.codehaus.groovy.syntax.Types

public class Types extends Object
Typing information for the CST system. The types here are those used by CSTNode, Token, and Reduction.

Author:
  bob mcwhirter, Chris Poirier

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ANY`
`static final int`
`ANY_END_OF_STATEMENT`
`static final int`
`ARRAY_EXPRESSION`
`static final int`
`ARRAY_ITEM_TERMINATORS`
`static final int`
`ASSIGN`
`static final int`
`ASSIGNMENT_OPERATOR`
`static final int`
`BITWISE_AND`
`static final int`
`BITWISE_AND_EQUAL`
`static final int`
`BITWISE_NEGATION`
`static final int`
`BITWISE_OPERATOR`
`static final int`
`BITWISE_OR`
`static final int`
`BITWISE_OR_EQUAL`
`static final int`
`BITWISE_XOR`
`static final int`
`BITWISE_XOR_EQUAL`
`static final int`
`COLON`
`static final int`
`COMMA`
`static final int`
`COMPARE_EQUAL`
`static final int`
`COMPARE_GREATER_THAN`
`static final int`
`COMPARE_GREATER_THAN_EQUAL`
`static final int`
`COMPARE_IDENTICAL`
`static final int`
`COMPARE_LESS_THAN`
`static final int`
`COMPARE_LESS_THAN_EQUAL`
`static final int`
`COMPARE_NOT_EQUAL`
`static final int`
`COMPARE_NOT_IDENTICAL`
`static final int`
`COMPARE_TO`
`static final int`
`COMPARISON_OPERATOR`
`static final int`
`COMPLEX_EXPRESSION`
`static final int`
`CREATABLE_PRIMITIVE_TYPE`
`static final int`
`CREATABLE_TYPE_NAME`
`static final int`
`DECIMAL_NUMBER`
`static final int`
`DECLARATION_MODIFIER`
`static final int`
`DEREFERENCE_OPERATOR`
`static final int`
`DIVIDE`
`static final int`
`DIVIDE_EQUAL`
`static final int`
`DOT`
`static final int`
`DOT_DOT`
`static final int`
`DOT_DOT_DOT`
`static final int`
`DOUBLE_PIPE`
`static final int`
`EOF`
`static final int`
`EQUAL`
`static final int`
`EQUALS`
`static final int`
`EXPRESSION`
`static final int`
`FIND_REGEX`
`static final int`
`GENERAL_END_OF_STATEMENT`
`static final int`
`GSTRING_END`
`static final int`
`GSTRING_EXPRESSION_END`
`static final int`
`GSTRING_EXPRESSION_START`
`static final int`
`GSTRING_START`
`static final int`
`IDENTIFIER`
`static final int`
`INFIX_OPERATOR`
`static final int`
`INTDIV`
`static final int`
`INTDIV_EQUAL`
`static final int`
`INTEGER_NUMBER`
`static final int`
`KEYWORD`
`static final int`
`KEYWORD_ABSTRACT`
`static final int`
`KEYWORD_AS`
`static final int`
`KEYWORD_ASSERT`
`static final int`
`KEYWORD_BOOLEAN`
`static final int`
`KEYWORD_BREAK`
`static final int`
`KEYWORD_BYTE`
`static final int`
`KEYWORD_CASE`
`static final int`
`KEYWORD_CATCH`
`static final int`
`KEYWORD_CHAR`
`static final int`
`KEYWORD_CLASS`
`static final int`
`KEYWORD_CONST`
`static final int`
`KEYWORD_CONTINUE`
`static final int`
`KEYWORD_DEF`
`static final int`
`KEYWORD_DEFAULT`
`static final int`
`KEYWORD_DEFMACRO`
`static final int`
`KEYWORD_DO`
`static final int`
`KEYWORD_DOUBLE`
`static final int`
`KEYWORD_ELSE`
`static final int`
`KEYWORD_EXPRESSION`
`static final int`
`KEYWORD_EXTENDS`
`static final int`
`KEYWORD_FALSE`
`static final int`
`KEYWORD_FINAL`
`static final int`
`KEYWORD_FINALLY`
`static final int`
`KEYWORD_FLOAT`
`static final int`
`KEYWORD_FOR`
`static final int`
`KEYWORD_GOTO`
`static final int`
`KEYWORD_IDENTIFIER`
`static final int`
`KEYWORD_IF`
`static final int`
`KEYWORD_IMPLEMENTS`
`static final int`
`KEYWORD_IMPORT`
`static final int`
`KEYWORD_IN`
`static final int`
`KEYWORD_INSTANCEOF`
`static final int`
`KEYWORD_INT`
`static final int`
`KEYWORD_INTERFACE`
`static final int`
`KEYWORD_LONG`
`static final int`
`KEYWORD_MIXIN`
`static final int`
`KEYWORD_NATIVE`
`static final int`
`KEYWORD_NEW`
`static final int`
`KEYWORD_NULL`
`static final int`
`KEYWORD_PACKAGE`
`static final int`
`KEYWORD_PRIVATE`
`static final int`
`KEYWORD_PROPERTY`
`static final int`
`KEYWORD_PROTECTED`
`static final int`
`KEYWORD_PUBLIC`
`static final int`
`KEYWORD_RETURN`
`static final int`
`KEYWORD_SHORT`
`static final int`
`KEYWORD_STATIC`
`static final int`
`KEYWORD_SUPER`
`static final int`
`KEYWORD_SWITCH`
`static final int`
`KEYWORD_SYNCHRONIZED`
`static final int`
`KEYWORD_THIS`
`static final int`
`KEYWORD_THROW`
`static final int`
`KEYWORD_THROWS`
`static final int`
`KEYWORD_TRANSIENT`
`static final int`
`KEYWORD_TRUE`
`static final int`
`KEYWORD_TRY`
`static final int`
`KEYWORD_VOID`
`static final int`
`KEYWORD_VOLATILE`
`static final int`
`KEYWORD_WHILE`
`static final int`
`LEFT_CURLY_BRACE`
`static final int`
`LEFT_OF_MATCHED_CONTAINER`
`static final int`
`LEFT_PARENTHESIS`
`static final int`
`LEFT_SHIFT`
`static final int`
`LEFT_SHIFT_EQUAL`
`static final int`
`LEFT_SQUARE_BRACKET`
`static final int`
`LITERAL`
`static final int`
`LITERAL_EXPRESSION`
`static final int`
`LOGICAL_AND`
`static final int`
`LOGICAL_AND_EQUAL`
`static final int`
`LOGICAL_OPERATOR`
`static final int`
`LOGICAL_OR`
`static final int`
`LOGICAL_OR_EQUAL`
`static final int`
`LOOP`
`static final int`
`MATCH_REGEX`
`static final int`
`MATCHED_CONTAINER`
`static final int`
`MATH_OPERATOR`
`static final int`
`METHOD_CALL_STARTERS`
`static final int`
`MINUS`
`static final int`
`MINUS_EQUAL`
`static final int`
`MINUS_MINUS`
`static final int`
`MOD`
`static final int`
`MOD_EQUAL`
`static final int`
`MULTIPLY`
`static final int`
`MULTIPLY_EQUAL`
`static final int`
`NAMED_VALUE`
`static final int`
`NAVIGATE`
`static final int`
`NEWLINE`
`static final int`
`NOT`
`static final int`
`NOT_EOF`
`static final int`
`NUMBER`
`static final int`
`OPERATOR_EXPRESSION`
`static final int`
`OPTIONAL_DATATYPE_FOLLOWERS`
`static final int`
`PARAMETER_TERMINATORS`
`static final int`
`PIPE`
`static final int`
`PLUS`
`static final int`
`PLUS_EQUAL`
`static final int`
`PLUS_PLUS`
`static final int`
`POSTFIX_MINUS_MINUS`
`static final int`
`POSTFIX_OPERATOR`
`static final int`
`POSTFIX_PLUS_PLUS`
`static final int`
`POWER`
`static final int`
`POWER_EQUAL`
`static final int`
`PRECLUDES_CAST_OPERATOR`
`static final int`
`PREFIX_MINUS`
`static final int`
`PREFIX_MINUS_MINUS`
`static final int`
`PREFIX_OPERATOR`
`static final int`
`PREFIX_OR_INFIX_OPERATOR`
`static final int`
`PREFIX_PLUS`
`static final int`
`PREFIX_PLUS_PLUS`
`static final int`
`PRIMITIVE_TYPE`
`static final int`
`PURE_PREFIX_OPERATOR`
`static final int`
`QUESTION`
`static final int`
`RANGE_OPERATOR`
`static final int`
`REGEX_COMPARISON_OPERATOR`
`static final int`
`REGEX_PATTERN`
`static final int`
`RESERVED_KEYWORD`
`static final int`
`RIGHT_CURLY_BRACE`
`static final int`
`RIGHT_OF_MATCHED_CONTAINER`
`static final int`
`RIGHT_PARENTHESIS`
`static final int`
`RIGHT_SHIFT`
`static final int`
`RIGHT_SHIFT_EQUAL`
`static final int`
`RIGHT_SHIFT_UNSIGNED`
`static final int`
`RIGHT_SHIFT_UNSIGNED_EQUAL`
`static final int`
`RIGHT_SQUARE_BRACKET`
`static final int`
`SEMICOLON`
`static final int`
`SIGN`
`static final int`
`SIMPLE_EXPRESSION`
`static final int`
`STAR`
`static final int`
`STAR_STAR`
`static final int`
`STRING`
`static final int`
`SWITCH_BLOCK_TERMINATORS`
`static final int`
`SWITCH_ENTRIES`
`static final int`
`SYMBOL`
`static final int`
`SYNTH_BLOCK`
`static final int`
`SYNTH_CAST`
`static final int`
`SYNTH_CLASS`
`static final int`
`SYNTH_CLOSURE`
`static final int`
`SYNTH_COMPILATION_UNIT`
`static final int`
`SYNTH_EXPRESSION`
`static final int`
`SYNTH_GSTRING`
`static final int`
`SYNTH_INTERFACE`
`static final int`
`SYNTH_LABEL`
`static final int`
`SYNTH_LIST`
`static final int`
`SYNTH_MAP`
`static final int`
`SYNTH_METHOD`
`static final int`
`SYNTH_METHOD_CALL`
`static final int`
`SYNTH_MIXIN`
`static final int`
`SYNTH_PARAMETER_DECLARATION`
`static final int`
`SYNTH_PROPERTY`
`static final int`
`SYNTH_TERNARY`
`static final int`
`SYNTH_TUPLE`
`static final int`
`SYNTH_VARIABLE_DECLARATION`
`static final int`
`SYNTHETIC`
`static final int`
`TRUTH_VALUE`
`static final int`
`TYPE_DECLARATION`
`static final int`
`TYPE_LIST_TERMINATORS`
`static final int`
`TYPE_NAME`
`static final int`
`UNKNOWN`
`static final int`
`UNSAFE_OVER_NEWLINES`

## Constructor Summary

Constructors
Constructor
Description
`Types()`

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`canMean(int actual, int preferred)`
Given two types, returns true if the first can be viewed as the second.
`static String`
`getDescription(int type)`
Gets the description for the specified type.
`static Collection<String>`
`getKeywords()`
`static int`
`getPrecedence(int type, boolean throwIfInvalid)`
Returns the precedence of the specified operator.
`static String`
`getText(int type)`
Returns the text for the specified type.
`static boolean`
`isKeyword(String text)`
`static int`
`lookup(String text, int filter)`
Returns the type for the specified symbol/keyword text.
`static int`
`lookupKeyword(String text)`
Returns the type for the specified keyword text.
`static int`
`lookupSymbol(String text)`
Returns the type for the specified symbol text.
`static void`
`makePostfix(CSTNode node, boolean throwIfInvalid)`
Converts a node from a generic type to a specific postfix type.
`static void`
`makePrefix(CSTNode node, boolean throwIfInvalid)`
Converts a node from a generic type to a specific prefix type.
`static boolean`
`ofType(int specific, int general)`
Given two types, returns true if the second describes the first.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### EOF

public static final int EOF

See Also:
  - Constant Field Values

### UNKNOWN

public static final int UNKNOWN

See Also:
  - Constant Field Values

### NEWLINE

public static final int NEWLINE

See Also:
  - Constant Field Values

### LEFT_CURLY_BRACE

public static final int LEFT_CURLY_BRACE

See Also:
  - Constant Field Values

### RIGHT_CURLY_BRACE

public static final int RIGHT_CURLY_BRACE

See Also:
  - Constant Field Values

### LEFT_SQUARE_BRACKET

public static final int LEFT_SQUARE_BRACKET

See Also:
  - Constant Field Values

### RIGHT_SQUARE_BRACKET

public static final int RIGHT_SQUARE_BRACKET

See Also:
  - Constant Field Values

### LEFT_PARENTHESIS

public static final int LEFT_PARENTHESIS

See Also:
  - Constant Field Values

### RIGHT_PARENTHESIS

public static final int RIGHT_PARENTHESIS

See Also:
  - Constant Field Values

### DOT

public static final int DOT

See Also:
  - Constant Field Values

### DOT_DOT

public static final int DOT_DOT

See Also:
  - Constant Field Values

### DOT_DOT_DOT

public static final int DOT_DOT_DOT

See Also:
  - Constant Field Values

### NAVIGATE

public static final int NAVIGATE

See Also:
  - Constant Field Values

### FIND_REGEX

public static final int FIND_REGEX

See Also:
  - Constant Field Values

### MATCH_REGEX

public static final int MATCH_REGEX

See Also:
  - Constant Field Values

### REGEX_PATTERN

public static final int REGEX_PATTERN

See Also:
  - Constant Field Values

### EQUAL

public static final int EQUAL

See Also:
  - Constant Field Values

### EQUALS

public static final int EQUALS

See Also:
  - Constant Field Values

### ASSIGN

public static final int ASSIGN

See Also:
  - Constant Field Values

### COMPARE_NOT_EQUAL

public static final int COMPARE_NOT_EQUAL

See Also:
  - Constant Field Values

### COMPARE_IDENTICAL

public static final int COMPARE_IDENTICAL

See Also:
  - Constant Field Values

### COMPARE_NOT_IDENTICAL

public static final int COMPARE_NOT_IDENTICAL

See Also:
  - Constant Field Values

### COMPARE_EQUAL

public static final int COMPARE_EQUAL

See Also:
  - Constant Field Values

### COMPARE_LESS_THAN

public static final int COMPARE_LESS_THAN

See Also:
  - Constant Field Values

### COMPARE_LESS_THAN_EQUAL

public static final int COMPARE_LESS_THAN_EQUAL

See Also:
  - Constant Field Values

### COMPARE_GREATER_THAN

public static final int COMPARE_GREATER_THAN

See Also:
  - Constant Field Values

### COMPARE_GREATER_THAN_EQUAL

public static final int COMPARE_GREATER_THAN_EQUAL

See Also:
  - Constant Field Values

### COMPARE_TO

public static final int COMPARE_TO

See Also:
  - Constant Field Values

### NOT

public static final int NOT

See Also:
  - Constant Field Values

### LOGICAL_OR

public static final int LOGICAL_OR

See Also:
  - Constant Field Values

### LOGICAL_AND

public static final int LOGICAL_AND

See Also:
  - Constant Field Values

### LOGICAL_OR_EQUAL

public static final int LOGICAL_OR_EQUAL

See Also:
  - Constant Field Values

### LOGICAL_AND_EQUAL

public static final int LOGICAL_AND_EQUAL

See Also:
  - Constant Field Values

### PLUS

public static final int PLUS

See Also:
  - Constant Field Values

### MINUS

public static final int MINUS

See Also:
  - Constant Field Values

### MULTIPLY

public static final int MULTIPLY

See Also:
  - Constant Field Values

### DIVIDE

public static final int DIVIDE

See Also:
  - Constant Field Values

### INTDIV

public static final int INTDIV

See Also:
  - Constant Field Values

### MOD

public static final int MOD

See Also:
  - Constant Field Values

### STAR_STAR

public static final int STAR_STAR

See Also:
  - Constant Field Values

### POWER

public static final int POWER

See Also:
  - Constant Field Values

### PLUS_EQUAL

public static final int PLUS_EQUAL

See Also:
  - Constant Field Values

### MINUS_EQUAL

public static final int MINUS_EQUAL

See Also:
  - Constant Field Values

### MULTIPLY_EQUAL

public static final int MULTIPLY_EQUAL

See Also:
  - Constant Field Values

### DIVIDE_EQUAL

public static final int DIVIDE_EQUAL

See Also:
  - Constant Field Values

### INTDIV_EQUAL

public static final int INTDIV_EQUAL

See Also:
  - Constant Field Values

### MOD_EQUAL

public static final int MOD_EQUAL

See Also:
  - Constant Field Values

### POWER_EQUAL

public static final int POWER_EQUAL

See Also:
  - Constant Field Values

### PLUS_PLUS

public static final int PLUS_PLUS

See Also:
  - Constant Field Values

### PREFIX_PLUS_PLUS

public static final int PREFIX_PLUS_PLUS

See Also:
  - Constant Field Values

### POSTFIX_PLUS_PLUS

public static final int POSTFIX_PLUS_PLUS

See Also:
  - Constant Field Values

### PREFIX_PLUS

public static final int PREFIX_PLUS

See Also:
  - Constant Field Values

### MINUS_MINUS

public static final int MINUS_MINUS

See Also:
  - Constant Field Values

### PREFIX_MINUS_MINUS

public static final int PREFIX_MINUS_MINUS

See Also:
  - Constant Field Values

### POSTFIX_MINUS_MINUS

public static final int POSTFIX_MINUS_MINUS

See Also:
  - Constant Field Values

### PREFIX_MINUS

public static final int PREFIX_MINUS

See Also:
  - Constant Field Values

### LEFT_SHIFT

public static final int LEFT_SHIFT

See Also:
  - Constant Field Values

### RIGHT_SHIFT

public static final int RIGHT_SHIFT

See Also:
  - Constant Field Values

### RIGHT_SHIFT_UNSIGNED

public static final int RIGHT_SHIFT_UNSIGNED

See Also:
  - Constant Field Values

### LEFT_SHIFT_EQUAL

public static final int LEFT_SHIFT_EQUAL

See Also:
  - Constant Field Values

### RIGHT_SHIFT_EQUAL

public static final int RIGHT_SHIFT_EQUAL

See Also:
  - Constant Field Values

### RIGHT_SHIFT_UNSIGNED_EQUAL

public static final int RIGHT_SHIFT_UNSIGNED_EQUAL

See Also:
  - Constant Field Values

### STAR

public static final int STAR

See Also:
  - Constant Field Values

### COMMA

public static final int COMMA

See Also:
  - Constant Field Values

### COLON

public static final int COLON

See Also:
  - Constant Field Values

### SEMICOLON

public static final int SEMICOLON

See Also:
  - Constant Field Values

### QUESTION

public static final int QUESTION

See Also:
  - Constant Field Values

### PIPE

public static final int PIPE

See Also:
  - Constant Field Values

### DOUBLE_PIPE

public static final int DOUBLE_PIPE

See Also:
  - Constant Field Values

### BITWISE_OR

public static final int BITWISE_OR

See Also:
  - Constant Field Values

### BITWISE_AND

public static final int BITWISE_AND

See Also:
  - Constant Field Values

### BITWISE_XOR

public static final int BITWISE_XOR

See Also:
  - Constant Field Values

### BITWISE_OR_EQUAL

public static final int BITWISE_OR_EQUAL

See Also:
  - Constant Field Values

### BITWISE_AND_EQUAL

public static final int BITWISE_AND_EQUAL

See Also:
  - Constant Field Values

### BITWISE_XOR_EQUAL

public static final int BITWISE_XOR_EQUAL

See Also:
  - Constant Field Values

### BITWISE_NEGATION

public static final int BITWISE_NEGATION

See Also:
  - Constant Field Values

### STRING

public static final int STRING

See Also:
  - Constant Field Values

### IDENTIFIER

public static final int IDENTIFIER

See Also:
  - Constant Field Values

### INTEGER_NUMBER

public static final int INTEGER_NUMBER

See Also:
  - Constant Field Values

### DECIMAL_NUMBER

public static final int DECIMAL_NUMBER

See Also:
  - Constant Field Values

### KEYWORD_PRIVATE

public static final int KEYWORD_PRIVATE

See Also:
  - Constant Field Values

### KEYWORD_PROTECTED

public static final int KEYWORD_PROTECTED

See Also:
  - Constant Field Values

### KEYWORD_PUBLIC

public static final int KEYWORD_PUBLIC

See Also:
  - Constant Field Values

### KEYWORD_ABSTRACT

public static final int KEYWORD_ABSTRACT

See Also:
  - Constant Field Values

### KEYWORD_FINAL

public static final int KEYWORD_FINAL

See Also:
  - Constant Field Values

### KEYWORD_NATIVE

public static final int KEYWORD_NATIVE

See Also:
  - Constant Field Values

### KEYWORD_TRANSIENT

public static final int KEYWORD_TRANSIENT

See Also:
  - Constant Field Values

### KEYWORD_VOLATILE

public static final int KEYWORD_VOLATILE

See Also:
  - Constant Field Values

### KEYWORD_SYNCHRONIZED

public static final int KEYWORD_SYNCHRONIZED

See Also:
  - Constant Field Values

### KEYWORD_STATIC

public static final int KEYWORD_STATIC

See Also:
  - Constant Field Values

### KEYWORD_DEF

public static final int KEYWORD_DEF

See Also:
  - Constant Field Values

### KEYWORD_DEFMACRO

public static final int KEYWORD_DEFMACRO

See Also:
  - Constant Field Values

### KEYWORD_CLASS

public static final int KEYWORD_CLASS

See Also:
  - Constant Field Values

### KEYWORD_INTERFACE

public static final int KEYWORD_INTERFACE

See Also:
  - Constant Field Values

### KEYWORD_MIXIN

public static final int KEYWORD_MIXIN

See Also:
  - Constant Field Values

### KEYWORD_IMPLEMENTS

public static final int KEYWORD_IMPLEMENTS

See Also:
  - Constant Field Values

### KEYWORD_EXTENDS

public static final int KEYWORD_EXTENDS

See Also:
  - Constant Field Values

### KEYWORD_THIS

public static final int KEYWORD_THIS

See Also:
  - Constant Field Values

### KEYWORD_SUPER

public static final int KEYWORD_SUPER

See Also:
  - Constant Field Values

### KEYWORD_INSTANCEOF

public static final int KEYWORD_INSTANCEOF

See Also:
  - Constant Field Values

### KEYWORD_PROPERTY

public static final int KEYWORD_PROPERTY

See Also:
  - Constant Field Values

### KEYWORD_NEW

public static final int KEYWORD_NEW

See Also:
  - Constant Field Values

### KEYWORD_PACKAGE

public static final int KEYWORD_PACKAGE

See Also:
  - Constant Field Values

### KEYWORD_IMPORT

public static final int KEYWORD_IMPORT

See Also:
  - Constant Field Values

### KEYWORD_AS

public static final int KEYWORD_AS

See Also:
  - Constant Field Values

### KEYWORD_RETURN

public static final int KEYWORD_RETURN

See Also:
  - Constant Field Values

### KEYWORD_IF

public static final int KEYWORD_IF

See Also:
  - Constant Field Values

### KEYWORD_ELSE

public static final int KEYWORD_ELSE

See Also:
  - Constant Field Values

### KEYWORD_DO

public static final int KEYWORD_DO

See Also:
  - Constant Field Values

### KEYWORD_WHILE

public static final int KEYWORD_WHILE

See Also:
  - Constant Field Values

### KEYWORD_FOR

public static final int KEYWORD_FOR

See Also:
  - Constant Field Values

### KEYWORD_IN

public static final int KEYWORD_IN

See Also:
  - Constant Field Values

### KEYWORD_BREAK

public static final int KEYWORD_BREAK

See Also:
  - Constant Field Values

### KEYWORD_CONTINUE

public static final int KEYWORD_CONTINUE

See Also:
  - Constant Field Values

### KEYWORD_SWITCH

public static final int KEYWORD_SWITCH

See Also:
  - Constant Field Values

### KEYWORD_CASE

public static final int KEYWORD_CASE

See Also:
  - Constant Field Values

### KEYWORD_DEFAULT

public static final int KEYWORD_DEFAULT

See Also:
  - Constant Field Values

### KEYWORD_TRY

public static final int KEYWORD_TRY

See Also:
  - Constant Field Values

### KEYWORD_CATCH

public static final int KEYWORD_CATCH

See Also:
  - Constant Field Values

### KEYWORD_FINALLY

public static final int KEYWORD_FINALLY

See Also:
  - Constant Field Values

### KEYWORD_THROW

public static final int KEYWORD_THROW

See Also:
  - Constant Field Values

### KEYWORD_THROWS

public static final int KEYWORD_THROWS

See Also:
  - Constant Field Values

### KEYWORD_ASSERT

public static final int KEYWORD_ASSERT

See Also:
  - Constant Field Values

### KEYWORD_VOID

public static final int KEYWORD_VOID

See Also:
  - Constant Field Values

### KEYWORD_BOOLEAN

public static final int KEYWORD_BOOLEAN

See Also:
  - Constant Field Values

### KEYWORD_BYTE

public static final int KEYWORD_BYTE

See Also:
  - Constant Field Values

### KEYWORD_SHORT

public static final int KEYWORD_SHORT

See Also:
  - Constant Field Values

### KEYWORD_INT

public static final int KEYWORD_INT

See Also:
  - Constant Field Values

### KEYWORD_LONG

public static final int KEYWORD_LONG

See Also:
  - Constant Field Values

### KEYWORD_FLOAT

public static final int KEYWORD_FLOAT

See Also:
  - Constant Field Values

### KEYWORD_DOUBLE

public static final int KEYWORD_DOUBLE

See Also:
  - Constant Field Values

### KEYWORD_CHAR

public static final int KEYWORD_CHAR

See Also:
  - Constant Field Values

### KEYWORD_TRUE

public static final int KEYWORD_TRUE

See Also:
  - Constant Field Values

### KEYWORD_FALSE

public static final int KEYWORD_FALSE

See Also:
  - Constant Field Values

### KEYWORD_NULL

public static final int KEYWORD_NULL

See Also:
  - Constant Field Values

### KEYWORD_CONST

public static final int KEYWORD_CONST

See Also:
  - Constant Field Values

### KEYWORD_GOTO

public static final int KEYWORD_GOTO

See Also:
  - Constant Field Values

### SYNTH_COMPILATION_UNIT

public static final int SYNTH_COMPILATION_UNIT

See Also:
  - Constant Field Values

### SYNTH_CLASS

public static final int SYNTH_CLASS

See Also:
  - Constant Field Values

### SYNTH_INTERFACE

public static final int SYNTH_INTERFACE

See Also:
  - Constant Field Values

### SYNTH_MIXIN

public static final int SYNTH_MIXIN

See Also:
  - Constant Field Values

### SYNTH_METHOD

public static final int SYNTH_METHOD

See Also:
  - Constant Field Values

### SYNTH_PROPERTY

public static final int SYNTH_PROPERTY

See Also:
  - Constant Field Values

### SYNTH_PARAMETER_DECLARATION

public static final int SYNTH_PARAMETER_DECLARATION

See Also:
  - Constant Field Values

### SYNTH_LIST

public static final int SYNTH_LIST

See Also:
  - Constant Field Values

### SYNTH_MAP

public static final int SYNTH_MAP

See Also:
  - Constant Field Values

### SYNTH_GSTRING

public static final int SYNTH_GSTRING

See Also:
  - Constant Field Values

### SYNTH_METHOD_CALL

public static final int SYNTH_METHOD_CALL

See Also:
  - Constant Field Values

### SYNTH_CAST

public static final int SYNTH_CAST

See Also:
  - Constant Field Values

### SYNTH_BLOCK

public static final int SYNTH_BLOCK

See Also:
  - Constant Field Values

### SYNTH_CLOSURE

public static final int SYNTH_CLOSURE

See Also:
  - Constant Field Values

### SYNTH_LABEL

public static final int SYNTH_LABEL

See Also:
  - Constant Field Values

### SYNTH_TERNARY

public static final int SYNTH_TERNARY

See Also:
  - Constant Field Values

### SYNTH_TUPLE

public static final int SYNTH_TUPLE

See Also:
  - Constant Field Values

### SYNTH_VARIABLE_DECLARATION

public static final int SYNTH_VARIABLE_DECLARATION

See Also:
  - Constant Field Values

### GSTRING_START

public static final int GSTRING_START

See Also:
  - Constant Field Values

### GSTRING_END

public static final int GSTRING_END

See Also:
  - Constant Field Values

### GSTRING_EXPRESSION_START

public static final int GSTRING_EXPRESSION_START

See Also:
  - Constant Field Values

### GSTRING_EXPRESSION_END

public static final int GSTRING_EXPRESSION_END

See Also:
  - Constant Field Values

### ANY

public static final int ANY

See Also:
  - Constant Field Values

### NOT_EOF

public static final int NOT_EOF

See Also:
  - Constant Field Values

### GENERAL_END_OF_STATEMENT

public static final int GENERAL_END_OF_STATEMENT

See Also:
  - Constant Field Values

### ANY_END_OF_STATEMENT

public static final int ANY_END_OF_STATEMENT

See Also:
  - Constant Field Values

### ASSIGNMENT_OPERATOR

public static final int ASSIGNMENT_OPERATOR

See Also:
  - Constant Field Values

### COMPARISON_OPERATOR

public static final int COMPARISON_OPERATOR

See Also:
  - Constant Field Values

### MATH_OPERATOR

public static final int MATH_OPERATOR

See Also:
  - Constant Field Values

### LOGICAL_OPERATOR

public static final int LOGICAL_OPERATOR

See Also:
  - Constant Field Values

### RANGE_OPERATOR

public static final int RANGE_OPERATOR

See Also:
  - Constant Field Values

### REGEX_COMPARISON_OPERATOR

public static final int REGEX_COMPARISON_OPERATOR

See Also:
  - Constant Field Values

### DEREFERENCE_OPERATOR

public static final int DEREFERENCE_OPERATOR

See Also:
  - Constant Field Values

### BITWISE_OPERATOR

public static final int BITWISE_OPERATOR

See Also:
  - Constant Field Values

### PREFIX_OPERATOR

public static final int PREFIX_OPERATOR

See Also:
  - Constant Field Values

### POSTFIX_OPERATOR

public static final int POSTFIX_OPERATOR

See Also:
  - Constant Field Values

### INFIX_OPERATOR

public static final int INFIX_OPERATOR

See Also:
  - Constant Field Values

### PREFIX_OR_INFIX_OPERATOR

public static final int PREFIX_OR_INFIX_OPERATOR

See Also:
  - Constant Field Values

### PURE_PREFIX_OPERATOR

public static final int PURE_PREFIX_OPERATOR

See Also:
  - Constant Field Values

### KEYWORD

public static final int KEYWORD

See Also:
  - Constant Field Values

### SYMBOL

public static final int SYMBOL

See Also:
  - Constant Field Values

### LITERAL

public static final int LITERAL

See Also:
  - Constant Field Values

### NUMBER

public static final int NUMBER

See Also:
  - Constant Field Values

### SIGN

public static final int SIGN

See Also:
  - Constant Field Values

### NAMED_VALUE

public static final int NAMED_VALUE

See Also:
  - Constant Field Values

### TRUTH_VALUE

public static final int TRUTH_VALUE

See Also:
  - Constant Field Values

### PRIMITIVE_TYPE

public static final int PRIMITIVE_TYPE

See Also:
  - Constant Field Values

### CREATABLE_PRIMITIVE_TYPE

public static final int CREATABLE_PRIMITIVE_TYPE

See Also:
  - Constant Field Values

### LOOP

public static final int LOOP

See Also:
  - Constant Field Values

### RESERVED_KEYWORD

public static final int RESERVED_KEYWORD

See Also:
  - Constant Field Values

### KEYWORD_IDENTIFIER

public static final int KEYWORD_IDENTIFIER

See Also:
  - Constant Field Values

### SYNTHETIC

public static final int SYNTHETIC

See Also:
  - Constant Field Values

### TYPE_DECLARATION

public static final int TYPE_DECLARATION

See Also:
  - Constant Field Values

### DECLARATION_MODIFIER

public static final int DECLARATION_MODIFIER

See Also:
  - Constant Field Values

### TYPE_NAME

public static final int TYPE_NAME

See Also:
  - Constant Field Values

### CREATABLE_TYPE_NAME

public static final int CREATABLE_TYPE_NAME

See Also:
  - Constant Field Values

### MATCHED_CONTAINER

public static final int MATCHED_CONTAINER

See Also:
  - Constant Field Values

### LEFT_OF_MATCHED_CONTAINER

public static final int LEFT_OF_MATCHED_CONTAINER

See Also:
  - Constant Field Values

### RIGHT_OF_MATCHED_CONTAINER

public static final int RIGHT_OF_MATCHED_CONTAINER

See Also:
  - Constant Field Values

### EXPRESSION

public static final int EXPRESSION

See Also:
  - Constant Field Values

### OPERATOR_EXPRESSION

public static final int OPERATOR_EXPRESSION

See Also:
  - Constant Field Values

### SYNTH_EXPRESSION

public static final int SYNTH_EXPRESSION

See Also:
  - Constant Field Values

### KEYWORD_EXPRESSION

public static final int KEYWORD_EXPRESSION

See Also:
  - Constant Field Values

### LITERAL_EXPRESSION

public static final int LITERAL_EXPRESSION

See Also:
  - Constant Field Values

### ARRAY_EXPRESSION

public static final int ARRAY_EXPRESSION

See Also:
  - Constant Field Values

### SIMPLE_EXPRESSION

public static final int SIMPLE_EXPRESSION

See Also:
  - Constant Field Values

### COMPLEX_EXPRESSION

public static final int COMPLEX_EXPRESSION

See Also:
  - Constant Field Values

### PARAMETER_TERMINATORS

public static final int PARAMETER_TERMINATORS

See Also:
  - Constant Field Values

### ARRAY_ITEM_TERMINATORS

public static final int ARRAY_ITEM_TERMINATORS

See Also:
  - Constant Field Values

### TYPE_LIST_TERMINATORS

public static final int TYPE_LIST_TERMINATORS

See Also:
  - Constant Field Values

### OPTIONAL_DATATYPE_FOLLOWERS

public static final int OPTIONAL_DATATYPE_FOLLOWERS

See Also:
  - Constant Field Values

### SWITCH_BLOCK_TERMINATORS

public static final int SWITCH_BLOCK_TERMINATORS

See Also:
  - Constant Field Values

### SWITCH_ENTRIES

public static final int SWITCH_ENTRIES

See Also:
  - Constant Field Values

### METHOD_CALL_STARTERS

public static final int METHOD_CALL_STARTERS

See Also:
  - Constant Field Values

### UNSAFE_OVER_NEWLINES

public static final int UNSAFE_OVER_NEWLINES

See Also:
  - Constant Field Values

### PRECLUDES_CAST_OPERATOR

public static final int PRECLUDES_CAST_OPERATOR

See Also:
  - Constant Field Values

## Constructor Details

### Types

public Types()

## Method Details

### ofType

public static boolean ofType(int specific, int general)
Given two types, returns true if the second describes the first.

### canMean

public static boolean canMean(int actual, int preferred)
Given two types, returns true if the first can be viewed as the second. NOTE that `canMean()` is orthogonal to `ofType()`.

### makePrefix

public static void makePrefix(CSTNode node, boolean throwIfInvalid)
Converts a node from a generic type to a specific prefix type. Throws a `GroovyBugError` if the type can't be converted and requested.

### makePostfix

public static void makePostfix(CSTNode node, boolean throwIfInvalid)
Converts a node from a generic type to a specific postfix type. Throws a `GroovyBugError` if the type can't be converted.

### getPrecedence

public static int getPrecedence(int type, boolean throwIfInvalid)
Returns the precedence of the specified operator. Non-operator's will receive -1 or a GroovyBugError, depending on your preference.

### getKeywords

public static Collection<String> getKeywords()

### isKeyword

public static boolean isKeyword(String text)

### lookup

public static int lookup(String text, int filter)
Returns the type for the specified symbol/keyword text. Returns UNKNOWN if the text isn't found. You can filter finds on a type.

### lookupKeyword

public static int lookupKeyword(String text)
Returns the type for the specified keyword text. Returns UNKNOWN if the text isn't found.

### lookupSymbol

public static int lookupSymbol(String text)
Returns the type for the specified symbol text. Returns UNKNOWN if the text isn't found.

### getText

public static String getText(int type)
Returns the text for the specified type. Returns "" if the text isn't found.

### getDescription

public static String getDescription(int type)
Gets the description for the specified type.