Class WorkspaceLibraryInfo
java.lang.Object
org.fife.rsta.ac.java.buildpath.LibraryInfo
net.mcreator.java.WorkspaceLibraryInfo
- All Implemented Interfaces:
Cloneable, Comparable<org.fife.rsta.ac.java.buildpath.LibraryInfo>
public class WorkspaceLibraryInfo
extends org.fife.rsta.ac.java.buildpath.LibraryInfo
A
LibraryInfo over the directory with compiled workspace classes (Gradle build output),
making code completion aware of the classes of the workspace itself. Unlike DirLibraryInfo,
it tolerates the directory not existing yet (workspace that was not built).
The class list of a library is only indexed when the library is registered with a jar manager,
so ProjectJarManager.refreshWorkspaceClassInfo() re-registers a new instance of
this class after each Gradle task run, which is the only point at which compiled workspace
classes can change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintcompareTo(org.fife.rsta.ac.java.buildpath.LibraryInfo info) LibraryInfo#equals(Object)delegates to this method, andJarManager#addClassFileSource(LibraryInfo)uses equality to detect that a library is already registered.org.fife.rsta.ac.java.classreader.ClassFilecreateClassFile(String entryName) org.fife.rsta.ac.java.classreader.ClassFilecreateClassFileBulk(String entryName) org.fife.rsta.ac.java.PackageMapNodelongorg.fife.rsta.ac.java.buildpath.SourceLocationintvoidAttaches a fresh source location instance to this library.voidsetSourceLocation(org.fife.rsta.ac.java.buildpath.SourceLocation sourceLocation) Methods inherited from class org.fife.rsta.ac.java.buildpath.LibraryInfo
clone, equals, getJreJarInfo, getMainJreJarInfo, hashCode
-
Constructor Details
-
WorkspaceLibraryInfo
-
-
Method Details
-
refreshSourceLocation
public void refreshSourceLocation()Attaches a fresh source location instance to this library. Workspace source files presented by code completion (javadoc, parameter names) are parsed on demand, but cached keyed on the source location instance identity, so a fresh instance makes code completion re-read them. -
getSourceLocation
public org.fife.rsta.ac.java.buildpath.SourceLocation getSourceLocation()- Overrides:
getSourceLocationin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
setSourceLocation
public void setSourceLocation(org.fife.rsta.ac.java.buildpath.SourceLocation sourceLocation) - Overrides:
setSourceLocationin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
bulkClassFileCreationStart
public void bulkClassFileCreationStart()- Specified by:
bulkClassFileCreationStartin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
bulkClassFileCreationEnd
public void bulkClassFileCreationEnd()- Specified by:
bulkClassFileCreationEndin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
compareTo
public int compareTo(@Nonnull org.fife.rsta.ac.java.buildpath.LibraryInfo info) LibraryInfo#equals(Object)delegates to this method, andJarManager#addClassFileSource(LibraryInfo)uses equality to detect that a library is already registered. Matching on the classes directory makes any two instances over the same directory equal, so re-registering a fresh instance replaces (and thus re-indexes) the already registered entry instead of adding a duplicate one. -
createClassFile
public org.fife.rsta.ac.java.classreader.ClassFile createClassFile(String entryName) throws IOException - Specified by:
createClassFilein classorg.fife.rsta.ac.java.buildpath.LibraryInfo- Throws:
IOException
-
createClassFileBulk
public org.fife.rsta.ac.java.classreader.ClassFile createClassFileBulk(String entryName) throws IOException - Specified by:
createClassFileBulkin classorg.fife.rsta.ac.java.buildpath.LibraryInfo- Throws:
IOException
-
createPackageMap
public org.fife.rsta.ac.java.PackageMapNode createPackageMap()- Specified by:
createPackageMapin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
getLocationAsString
- Specified by:
getLocationAsStringin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-
hashCodeImpl
public int hashCodeImpl()- Specified by:
hashCodeImplin classorg.fife.rsta.ac.java.buildpath.LibraryInfo
-