Record Class Import
java.lang.Object
java.lang.Record
com.google.javascript.jscomp.modules.Import
- Record Components:
moduleRequest
- Returns the module identifier of this import.importName
- Returns the name that was imported from the requested module.For
import *
this will return "*".localName
- Returns the local name the imported value is bound to.modulePath
- Returns the path of the containing module, if from an ES module.importNode
- Returns the import node for source information.nameNode
- Returns the name node for source information.
public record Import(String moduleRequest, String importName, String localName, @Nullable ModuleLoader.ModulePath modulePath, Node importNode, Node nameNode)
extends Record
An
import
ed name in a module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theimportName
record component.Returns the value of theimportNode
record component.Returns the value of thelocalName
record component.@Nullable ModuleLoader.ModulePath
Returns the value of themodulePath
record component.Returns the value of themoduleRequest
record component.nameNode()
Returns the value of thenameNode
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Import
public Import(String moduleRequest, String importName, String localName, @Nullable ModuleLoader.ModulePath modulePath, Node importNode, Node nameNode) Creates an instance of aImport
record class.- Parameters:
moduleRequest
- the value for themoduleRequest
record componentimportName
- the value for theimportName
record componentlocalName
- the value for thelocalName
record componentmodulePath
- the value for themodulePath
record componentimportNode
- the value for theimportNode
record componentnameNode
- the value for thenameNode
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
moduleRequest
Returns the value of themoduleRequest
record component.- Returns:
- the value of the
moduleRequest
record component
-
importName
Returns the value of theimportName
record component.- Returns:
- the value of the
importName
record component
-
localName
Returns the value of thelocalName
record component.- Returns:
- the value of the
localName
record component
-
modulePath
Returns the value of themodulePath
record component.- Returns:
- the value of the
modulePath
record component
-
importNode
Returns the value of theimportNode
record component.- Returns:
- the value of the
importNode
record component
-
nameNode
Returns the value of thenameNode
record component.- Returns:
- the value of the
nameNode
record component
-