Uses of Class
com.puppycrawl.tools.checkstyle.checks.coding.RequireThisCheck.AbstractFrame
Package
Description
Contains the Coding checks that are
bundled with the main distribution.
-
Uses of RequireThisCheck.AbstractFrame in com.puppycrawl.tools.checkstyle.checks.coding
Modifier and TypeClassDescriptionprivate static class
An anonymous class frame; holds instance variable names.private static class
A frame initiated on entering a statement list; holds local variable names.private static class
A frame initiated on entering a catch block; holds local catch variable names.private static class
A frame initiated at class, enum or interface definition; holds instance variable names.private static class
A frame initiated at constructor definition.private static class
A frame initiated on entering a for block; holds local for variable names.private static class
A frame initiated at method definition; holds a method definition token.private static class
A frame initiated on entering a try-with-resources construct; holds local resources for the try block.Modifier and TypeFieldDescriptionprivate final RequireThisCheck.AbstractFrame
RequireThisCheck.AbstractFrame.parent
Parent frame.Modifier and TypeFieldDescriptionprivate final Deque<RequireThisCheck.AbstractFrame>
RequireThisCheck.current
Frame for the currently processed AST.private Map<DetailAST,
RequireThisCheck.AbstractFrame> RequireThisCheck.frames
Tree of all the parsed frames.Modifier and TypeMethodDescriptionprivate RequireThisCheck.AbstractFrame
RequireThisCheck.findClassFrame
(DetailAST name, boolean lookForMethod) Find the class frame containing declaration.private RequireThisCheck.AbstractFrame
Find frame containing declaration.private static RequireThisCheck.AbstractFrame
RequireThisCheck.findFrame
(RequireThisCheck.AbstractFrame frame, DetailAST name, boolean lookForMethod) Find frame containing declaration.private RequireThisCheck.AbstractFrame
RequireThisCheck.getClassFrameWhereViolationIsFound
(DetailAST ast) Returns the class frame where violation is found (where the field is used without 'this') or null otherwise.private RequireThisCheck.AbstractFrame
RequireThisCheck.getFieldWithoutThis
(DetailAST ast, int parentType) Returns the frame where the field is declared, if the given field is used without 'this', and null otherwise.protected RequireThisCheck.AbstractFrame
RequireThisCheck.AbstractFrame.getIfContains
(DetailAST identToFind, boolean lookForMethod) Check whether the frame contains a given name.protected RequireThisCheck.AbstractFrame
RequireThisCheck.CatchFrame.getIfContains
(DetailAST identToFind, boolean lookForMethod) protected RequireThisCheck.AbstractFrame
RequireThisCheck.ClassFrame.getIfContains
(DetailAST identToFind, boolean lookForMethod) private RequireThisCheck.AbstractFrame
RequireThisCheck.getMethodWithoutThis
(DetailAST ast) Returns the frame where the method is declared, if the given method is used without 'this' and null otherwise.protected RequireThisCheck.AbstractFrame
RequireThisCheck.AbstractFrame.getParent()
Returns the parent frame.Modifier and TypeMethodDescriptionprivate static void
RequireThisCheck.collectMethodDeclarations
(Deque<RequireThisCheck.AbstractFrame> frameStack, DetailAST ast, RequireThisCheck.AbstractFrame frame) CollectsMETHOD_DEF
declarations.private static void
RequireThisCheck.collectVariableDeclarations
(DetailAST ast, RequireThisCheck.AbstractFrame frame) Collects variable declarations.private static RequireThisCheck.AbstractFrame
RequireThisCheck.findFrame
(RequireThisCheck.AbstractFrame frame, DetailAST name, boolean lookForMethod) Find frame containing declaration.private static boolean
RequireThisCheck.isInsideConstructorFrame
(RequireThisCheck.AbstractFrame frame) Checks whether a field usage frame is inside constructor frame.private static boolean
RequireThisCheck.isReturnedVariable
(RequireThisCheck.AbstractFrame currentFrame, DetailAST ident) Checks whether the current variable is returned from the method.private static boolean
RequireThisCheck.isUserDefinedArrangementOfThis
(RequireThisCheck.AbstractFrame currentFrame, DetailAST ident) Checks whether user arranges 'this' for variable in method, constructor, or block on his own.private void
RequireThisCheck.logViolation
(String msgKey, DetailAST ast, RequireThisCheck.AbstractFrame frame) Helper method to log a Violation.Modifier and TypeMethodDescriptionprivate static void
RequireThisCheck.collectDeclarations
(Deque<RequireThisCheck.AbstractFrame> frameStack, DetailAST ast) Parses the next AST for declarations.private static void
RequireThisCheck.collectMethodDeclarations
(Deque<RequireThisCheck.AbstractFrame> frameStack, DetailAST ast, RequireThisCheck.AbstractFrame frame) CollectsMETHOD_DEF
declarations.private void
RequireThisCheck.endCollectingDeclarations
(Queue<RequireThisCheck.AbstractFrame> frameStack, DetailAST ast) Ends parsing of the AST for declarations.ModifierConstructorDescriptionprotected
AbstractFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Constructor -- invocable only via super() from subclasses.protected
AnonymousClassFrame
(RequireThisCheck.AbstractFrame parent, String frameName) Creates anonymous class frame.protected
BlockFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates block frame.protected
CatchFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates catch frame.private
ClassFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates new instance of ClassFrame.protected
ConstructorFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates a constructor frame.protected
ForFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates for frame.protected
MethodFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates method frame.protected
TryWithResourcesFrame
(RequireThisCheck.AbstractFrame parent, DetailAST ident) Creates try-with-resources frame.