Class File


  • public class File
    extends Object
    Java Bean class for a file of the Checkstyle format.
    Author:
    Ullrich Hafner
    • Constructor Detail

      • File

        public File()
    • Method Detail

      • addError

        public void addError​(Error violation)
        Adds a new violation to this file.
        Parameters:
        violation - the new violation
      • getErrors

        public Collection<Error> getErrors()
        Returns all violations of this file. The returned collection is read-only.
        Returns:
        all violations in this file
      • getName

        @CheckForNull
        public String getName()
        Returns the name of this file.
        Returns:
        the name of this file
      • setName

        public void setName​(@CheckForNull
                            String name)
        Sets the name of this file to the specified value.
        Parameters:
        name - the value to set