Class ModuleLocation
java.lang.Object
io.github.ascopes.jct.filemanagers.ModuleLocation
- All Implemented Interfaces:
JavaFileManager.Location
Handle that represents the location of a module.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Constructor Summary
ConstructorDescriptionModuleLocation
(JavaFileManager.Location parent, String moduleName) Initialize the location. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the module name.getName()
Get the parent location.int
hashCode()
boolean
boolean
toString()
static Optional
<ModuleLocation> upcast
(JavaFileManager.Location location) Attempt to upcast a given location to a ModuleLocation if it is an instance of ModuleLocation.
-
Constructor Details
-
ModuleLocation
Initialize the location.- Parameters:
parent
- the parent location.moduleName
- the module name.- Throws:
JctIllegalInputException
- if the parent location is not an output location or a module-oriented location.
-
-
Method Details
-
getParent
-
getModuleName
-
getName
- Specified by:
getName
in interfaceJavaFileManager.Location
-
isOutputLocation
- Specified by:
isOutputLocation
in interfaceJavaFileManager.Location
-
isModuleOrientedLocation
- Specified by:
isModuleOrientedLocation
in interfaceJavaFileManager.Location
-
equals
-
hashCode
-
toString
-
upcast
Attempt to upcast a given location to a ModuleLocation if it is an instance of ModuleLocation.- Parameters:
location
- the location to attempt to upcast.- Returns:
- an optional containing the upcast location if it is a module location, or an empty optional if not.
- Since:
- 1.1.5
-