Enum GitIdentifiers.FileMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<GitIdentifiers.FileMode>
    Enclosing class:
    GitIdentifiers

    public static enum GitIdentifiers.FileMode
    extends java.lang.Enum<GitIdentifiers.FileMode>
    The type of a Git tree entry, which maps to a Unix file-mode string.

    Git encodes the file type and permission bits as an ASCII octal string that precedes the entry name in the binary tree format. The values defined here cover the four entry types that Git itself produces.

    See Also:
    Git Internals – Git Objects
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DIRECTORY
      A subdirectory.
      EXECUTABLE
      A regular, but executable, file.
      GIT_LINK
      A gitlink, SHA-1 of the object refers to a commit in another repository.
      REGULAR
      A regular (non-executable) file.
      SYMBOLIC_LINK
      A symbolic link.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] modeBytes
      Serialized mode: since this is mutable, it must remain private.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FileMode​(byte[] modeBytes)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static GitIdentifiers.FileMode get​(java.nio.file.Path path)  
      static GitIdentifiers.FileMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static GitIdentifiers.FileMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • modeBytes

        private final byte[] modeBytes
        Serialized mode: since this is mutable, it must remain private.
    • Constructor Detail

      • FileMode

        private FileMode​(byte[] modeBytes)
    • Method Detail

      • values

        public static GitIdentifiers.FileMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GitIdentifiers.FileMode c : GitIdentifiers.FileMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GitIdentifiers.FileMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null