Class EqualsAvoidNullCheck.FieldFrame

  • Enclosing class:
    EqualsAvoidNullCheck

    private static class EqualsAvoidNullCheck.FieldFrame
    extends java.lang.Object
    Holds the names of fields of a type.
    • Field Detail

      • fields

        private final java.util.Set<DetailAST> fields
        Set of fields.
      • methodCalls

        private final java.util.Set<DetailAST> methodCalls
        Set of equals calls.
      • frameName

        private java.lang.String frameName
        Name of the class, enum or enum constant declaration.
      • classOrEnumOrEnumConstDef

        private boolean classOrEnumOrEnumConstDef
        Whether the frame is CLASS_DEF, ENUM_DEF or ENUM_CONST_DEF.
    • Method Detail

      • setFrameName

        public void setFrameName​(java.lang.String frameName)
        Set the frame name.
        Parameters:
        frameName - value to set.
      • getFrameName

        public java.lang.String getFrameName()
        Getter for the frame name.
        Returns:
        frame name.
      • addField

        public void addField​(DetailAST field)
        Add field to this FieldFrame.
        Parameters:
        field - the ast of the field.
      • setClassOrEnumOrEnumConstDef

        public void setClassOrEnumOrEnumConstDef​(boolean value)
        Sets isClassOrEnum.
        Parameters:
        value - value to set.
      • isClassOrEnumOrEnumConstDef

        public boolean isClassOrEnumOrEnumConstDef()
        Getter for classOrEnumOrEnumConstDef.
        Returns:
        classOrEnumOrEnumConstDef.
      • addMethodCall

        public void addMethodCall​(DetailAST methodCall)
        Add method call to this frame.
        Parameters:
        methodCall - METHOD_CALL ast.
      • findField

        public DetailAST findField​(java.lang.String name)
        Determines whether this FieldFrame contains the field.
        Parameters:
        name - name of the field to check.
        Returns:
        true if this FieldFrame contains instance field field.
      • getMethodCalls

        public java.util.Set<DetailAST> getMethodCalls()
        Getter for frame's method calls.
        Returns:
        method calls of this frame.
      • getFieldName

        private static java.lang.String getFieldName​(DetailAST field)
        Get the name of the field.
        Parameters:
        field - to get the name from.
        Returns:
        name of the field.