Class ClassFileLocator.Resolution.Explicit

    • Field Detail

      • binaryRepresentation

        private final byte[] binaryRepresentation
        The represented data.
    • Constructor Detail

      • Explicit

        public Explicit​(byte[] binaryRepresentation)
        Creates a new explicit resolution of a given array of binary data.
        Parameters:
        binaryRepresentation - The binary data to represent. The array must not be modified.
    • Method Detail

      • isResolved

        public boolean isResolved()
        Checks if this binary representation is valid.
        Specified by:
        isResolved in interface ClassFileLocator.Resolution
        Returns:
        true if this binary representation is valid.
      • resolve

        public byte[] resolve()
        Finds the data of this binary representation. Calling this method is only legal for resolved instances. For non-resolved instances, an exception is thrown.
        Specified by:
        resolve in interface ClassFileLocator.Resolution
        Returns:
        The requested binary data. The returned array must not be altered.