Class AbstractSuperCheck.MethodNode
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.coding.AbstractSuperCheck.MethodNode
- Enclosing class:
AbstractSuperCheck
Stack node for a method definition and a record of
whether the method has a call to the super method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanTrue if the overriding method calls the super method.private final DetailASTMethod definition. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMethodNode(DetailAST ast) Constructs a stack node for a method definition. -
Method Summary
Modifier and TypeMethodDescription(package private) DetailASTReturns the overriding method definition AST.(package private) booleanDetermines whether the overriding method has a call to the super method.(package private) voidRecords that the overriding method has a call to the super method.
-
Field Details
-
method
Method definition. -
callingSuper
True if the overriding method calls the super method.
-
-
Constructor Details
-
MethodNode
Constructs a stack node for a method definition.- Parameters:
ast- AST for the method definition.
-
-
Method Details
-
setCallingSuper
void setCallingSuper()Records that the overriding method has a call to the super method. -
isCallingSuper
boolean isCallingSuper()Determines whether the overriding method has a call to the super method.- Returns:
- true if the overriding method has a call to the super method.
-
getMethod
Returns the overriding method definition AST.- Returns:
- the overriding method definition AST.
-