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
imported name in a module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theimportNamerecord component.Returns the value of theimportNoderecord component.Returns the value of thelocalNamerecord component.@Nullable ModuleLoader.ModulePathReturns the value of themodulePathrecord component.Returns the value of themoduleRequestrecord component.nameNode()Returns the value of thenameNoderecord component.final StringtoString()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 aImportrecord class.- Parameters:
moduleRequest- the value for themoduleRequestrecord componentimportName- the value for theimportNamerecord componentlocalName- the value for thelocalNamerecord componentmodulePath- the value for themodulePathrecord componentimportNode- the value for theimportNoderecord componentnameNode- the value for thenameNoderecord 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 themoduleRequestrecord component.- Returns:
- the value of the
moduleRequestrecord component
-
importName
Returns the value of theimportNamerecord component.- Returns:
- the value of the
importNamerecord component
-
localName
Returns the value of thelocalNamerecord component.- Returns:
- the value of the
localNamerecord component
-
modulePath
Returns the value of themodulePathrecord component.- Returns:
- the value of the
modulePathrecord component
-
importNode
Returns the value of theimportNoderecord component.- Returns:
- the value of the
importNoderecord component
-
nameNode
Returns the value of thenameNoderecord component.- Returns:
- the value of the
nameNoderecord component
-