Class EqualsAvoidNullCheck.FieldFrame
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck.FieldFrame
- Enclosing class:
EqualsAvoidNullCheck
Holds the names of fields of a type.
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<EqualsAvoidNullCheck.FieldFrame> Set of frame's children.private booleanWhether the frame is CLASS_DEF, ENUM_DEF, ENUM_CONST_DEF, or RECORD_DEF.Map of field name to field DetailAst.private StringName of the class, enum or enum constant declaration.Set of equals calls.private final EqualsAvoidNullCheck.FieldFrameParent frame. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates new frame. -
Method Summary
Modifier and TypeMethodDescription(package private) voidAdd child frame to this frame.(package private) voidAdd field to this FieldFrame.(package private) voidaddMethodCall(DetailAST methodCall) Add method call to this frame.(package private) DetailASTDetermines whether this FieldFrame contains the field.(package private) Set<EqualsAvoidNullCheck.FieldFrame> Getter for frame's children.private static StringgetFieldName(DetailAST field) Get the name of the field.(package private) StringGetter for the frame name.Getter for frame's method calls.(package private) EqualsAvoidNullCheck.FieldFrameGetter for the parent frame.(package private) booleanGetter for classOrEnumOrRecordDef.(package private) voidsetClassOrEnumOrRecordDef(boolean value) Sets isClassOrEnumOrRecordDef.(package private) voidsetFrameName(String frameName) Set the frame name.
-
Field Details
-
parent
Parent frame. -
children
Set of frame's children. -
fieldNameToAst
-
methodCalls
-
frameName
Name of the class, enum or enum constant declaration. -
classOrEnumOrRecordDef
private boolean classOrEnumOrRecordDefWhether the frame is CLASS_DEF, ENUM_DEF, ENUM_CONST_DEF, or RECORD_DEF.
-
-
Constructor Details
-
FieldFrame
Creates new frame.- Parameters:
parent- parent frame.
-
-
Method Details
-
setFrameName
-
getFrameName
-
getParent
-
getChildren
Set<EqualsAvoidNullCheck.FieldFrame> getChildren()Getter for frame's children.- Returns:
- children of this frame.
-
addChild
Add child frame to this frame.- Parameters:
child- frame to add.
-
addField
Add field to this FieldFrame.- Parameters:
field- the ast of the field.
-
setClassOrEnumOrRecordDef
void setClassOrEnumOrRecordDef(boolean value) Sets isClassOrEnumOrRecordDef.- Parameters:
value- value to set.
-
isClassOrEnumOrRecordDef
boolean isClassOrEnumOrRecordDef()Getter for classOrEnumOrRecordDef.- Returns:
- classOrEnumOrRecordDef.
-
addMethodCall
Add method call to this frame.- Parameters:
methodCall- METHOD_CALL ast.
-
findField
-
getMethodCalls
-
getFieldName
-