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 aAST)
Returns the scope of the surrounding "block".
|
static boolean |
inAnnotationBlock(DetailAST aAST)
Returns whether a node is directly contained within an annotation block.
|
static boolean |
inCodeBlock(DetailAST aAST)
Returns whether the scope of a node is restricted to a code block.
|
static boolean |
inEnumBlock(DetailAST aAST)
Returns whether a node is directly contained within an enum block.
|
static boolean |
inInterfaceBlock(DetailAST aAST)
Returns whether a node is directly contained within an interface block.
|
static boolean |
inInterfaceOrAnnotationBlock(DetailAST aAST)
Returns whether a node is directly contained within an interface or
annotation block.
|
static boolean |
isLocalVariableDef(DetailAST aAST)
Determines whether a node is a local variable definition.
|
static boolean |
isOuterMostType(DetailAST aAST)
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 aAST)
aAST
- the node to return the scope forpublic static boolean inInterfaceBlock(DetailAST aAST)
aAST
- the node to check if directly contained within an interface
blockboolean
valuepublic static boolean inAnnotationBlock(DetailAST aAST)
aAST
- the node to check if directly contained within an annotation
blockboolean
valuepublic static boolean inInterfaceOrAnnotationBlock(DetailAST aAST)
aAST
- the node to check if directly contained within an interface
or annotation blockboolean
valuepublic static boolean inEnumBlock(DetailAST aAST)
aAST
- the node to check if directly contained within an enum
blockboolean
valuepublic static boolean inCodeBlock(DetailAST aAST)
aAST
- the node to checkboolean
valuepublic static boolean isOuterMostType(DetailAST aAST)
aAST
- the node to checkboolean
valuepublic static boolean isLocalVariableDef(DetailAST aAST)
aAST
- the node to check.Copyright © 2001–2015. All rights reserved.