Package sc.layer

Class SrcEntry

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    ZipSrcEntry

    public class SrcEntry
    extends java.lang.Object
    implements java.lang.Cloneable
    Represents a src file being processed by the layered system. Stores the layer containing the file and the various path components.
    • Field Detail

      • layer

        public Layer layer
      • absFileName

        public java.lang.String absFileName
      • relFileName

        public java.lang.String relFileName
      • baseFileName

        public java.lang.String baseFileName
      • prependPackage

        public boolean prependPackage
      • srcRootName

        public java.lang.String srcRootName
      • hash

        public transient byte[] hash
    • Constructor Detail

      • SrcEntry

        public SrcEntry()
      • SrcEntry

        public SrcEntry​(Layer lyr,
                        java.lang.String absDir,
                        java.lang.String relDir,
                        java.lang.String baseName,
                        java.lang.String srcRootName)
      • SrcEntry

        public SrcEntry​(Layer lyr,
                        java.lang.String absDir,
                        java.lang.String relDir,
                        java.lang.String baseName,
                        boolean prepend,
                        java.lang.String srcRootName)
      • SrcEntry

        public SrcEntry​(Layer lyr,
                        java.lang.String absFile,
                        java.lang.String relFile)
      • SrcEntry

        public SrcEntry​(Layer lyr,
                        java.lang.String absFile,
                        java.lang.String relFile,
                        boolean prepend)
      • SrcEntry

        public SrcEntry​(Layer lyr,
                        java.lang.String absFile,
                        java.lang.String relFile,
                        boolean prepend,
                        java.lang.String srcRootName)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getTypeNameFromRelDirAndBaseName

        public static java.lang.String getTypeNameFromRelDirAndBaseName​(java.lang.String relDir,
                                                                        java.lang.String baseName)
      • getTypeNameFromRelName

        public static java.lang.String getTypeNameFromRelName​(java.lang.String relFileName)
      • getTypeName

        public java.lang.String getTypeName()
      • setTypeName

        public void setTypeName​(java.lang.String typeName,
                                boolean renameFile)
      • getRelTypeName

        public java.lang.String getRelTypeName()
        Occasionally you need the type name without the prefix, i.e. when not prepending the type name on generated files
      • getRelDir

        public java.lang.String getRelDir()
      • getExtension

        public java.lang.String getExtension()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toShortString

        public java.lang.String toShortString()
      • canRead

        public boolean canRead()
      • getLastModified

        public long getLastModified()
      • getInputStream

        public java.io.InputStream getInputStream()
      • getFileAsString

        public java.lang.String getFileAsString()
      • getFileSize

        public long getFileSize()
      • isZip

        public boolean isZip()
      • isLayerFile

        public boolean isLayerFile()
      • getJarUrl

        public java.lang.String getJarUrl()
      • clone

        public SrcEntry clone()
        Overrides:
        clone in class java.lang.Object