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.
- 
Field SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionprivateCreates new frame.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd child frame to this frame.voidAdd field to this FieldFrame.voidaddMethodCall(DetailAST methodCall) Add method call to this frame.Determines whether this FieldFrame contains the field.Getter for frame's children.private static StringgetFieldName(DetailAST field) Get the name of the field.Getter for the frame name.Getter for frame's method calls.Getter for the parent frame.booleanGetter for classOrEnumOrRecordDef.voidsetClassOrEnumOrRecordDef(boolean value) Sets isClassOrEnumOrRecordDef.voidsetFrameName(String frameName) Set the frame name.
- 
Field Details- 
parentParent frame.
- 
childrenSet of frame's children.
- 
fieldNameToAstMap of field name to field DetailAst.
- 
methodCallsSet of equals calls.
- 
frameNameName of the class, enum or enum constant declaration.
- 
classOrEnumOrRecordDefWhether the frame is CLASS_DEF, ENUM_DEF, ENUM_CONST_DEF, or RECORD_DEF.
 
- 
- 
Constructor Details- 
FieldFrameCreates new frame.- Parameters:
- parent- parent frame.
 
 
- 
- 
Method Details- 
setFrameNameSet the frame name.- Parameters:
- frameName- value to set.
 
- 
getFrameNameGetter for the frame name.- Returns:
- frame name.
 
- 
getParentGetter for the parent frame.- Returns:
- parent frame.
 
- 
getChildrenGetter for frame's children.- Returns:
- children of this frame.
 
- 
addChildAdd child frame to this frame.- Parameters:
- child- frame to add.
 
- 
addFieldAdd field to this FieldFrame.- Parameters:
- field- the ast of the field.
 
- 
setClassOrEnumOrRecordDefSets isClassOrEnumOrRecordDef.- Parameters:
- value- value to set.
 
- 
isClassOrEnumOrRecordDefGetter for classOrEnumOrRecordDef.- Returns:
- classOrEnumOrRecordDef.
 
- 
addMethodCallAdd method call to this frame.- Parameters:
- methodCall- METHOD_CALL ast.
 
- 
findFieldDetermines whether this FieldFrame contains the field.- Parameters:
- name- name of the field to check.
- Returns:
- DetailAST if this FieldFrame contains instance field.
 
- 
getMethodCallsGetter for frame's method calls.- Returns:
- method calls of this frame.
 
- 
getFieldNameGet the name of the field.- Parameters:
- field- to get the name from.
- Returns:
- name of the field.
 
 
-