public final class ScopeUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Scope |
getScopeFromMods(DetailAST aMods)
Returns the Scope specified by the modifier set.
|
static Scope |
getSurroundingScope(DetailAST node)
Returns the scope of the surrounding "block".
|
static boolean |
isClassFieldDef(DetailAST node)
Determines whether a node is a class field definition.
|
static boolean |
isInAnnotationBlock(DetailAST node)
Returns whether a node is directly contained within an annotation block.
|
static boolean |
isInCodeBlock(DetailAST node)
Returns whether the scope of a node is restricted to a code block.
|
static boolean |
isInEnumBlock(DetailAST node)
Returns whether a node is directly contained within an enum block.
|
static boolean |
isInInterfaceBlock(DetailAST node)
Returns whether a node is directly contained within an interface block.
|
static boolean |
isInInterfaceOrAnnotationBlock(DetailAST node)
Returns whether a node is directly contained within an interface or
annotation block.
|
static boolean |
isInScope(DetailAST ast,
Scope scope)
Checks whether ast node is in a specific scope.
|
static boolean |
isLocalVariableDef(DetailAST node)
Determines whether a node is a local variable definition.
|
static boolean |
isOuterMostType(DetailAST node)
Returns whether a node is contained in the outer most type block.
|
public static Scope getScopeFromMods(DetailAST aMods)
aMods
- root node of a modifier setScope
valuepublic static Scope getSurroundingScope(DetailAST node)
node
- the node to return the scope forpublic static boolean isInInterfaceBlock(DetailAST node)
node
- the node to check if directly contained within an interface block.boolean
valuepublic static boolean isInAnnotationBlock(DetailAST node)
node
- the node to check if directly contained within an annotation block.boolean
valuepublic static boolean isInInterfaceOrAnnotationBlock(DetailAST node)
node
- the node to check if directly contained within an interface
or annotation block.boolean
valuepublic static boolean isInEnumBlock(DetailAST node)
node
- the node to check if directly contained within an enum block.boolean
valuepublic static boolean isInCodeBlock(DetailAST node)
node
- the node to checkboolean
valuepublic static boolean isOuterMostType(DetailAST node)
node
- the node to checkboolean
valuepublic static boolean isLocalVariableDef(DetailAST node)
node
- the node to check.public static boolean isClassFieldDef(DetailAST node)
node
- the node to check.Copyright © 2001–2018. All rights reserved.