Top Description Inners Fields Constructors Methods
org.graalvm.polyglot.impl

pack-priv final Class ModuleToUnnamedFileSystemGen

extends ModuleToUnnamedFileSystem
Class Inheritance
Imports
java.lang.invoke.MethodHandle, .MethodHandles.Lookup, .MethodType, java.net.URI, java.nio.channels.SeekableByteChannel, java.nio.charset.Charset, java.nio.file.AccessMode, .CopyOption, .DirectoryStream, .DirectoryStream.Filter, .LinkOption, .OpenOption, .Path, java.nio.file.attribute.FileAttribute, java.util.List, .Map, .Objects, .Set, org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem, org.graalvm.polyglot.io.FileSystem

Generated code used for Truffle unnamed to named module bridge. This code allows polyglot on the classpath to delegate to polyglot on the module-path. This code is generated by the polyglot annotation processor.asdf

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final ModuleToUnnamedFileSystemGen.Handles
pack-priv final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
checkAccess(Path
the path to the file to check
path_
,
Set<? extends AccessMode>
the access modes to check, possibly empty to check existence only.
modes_
,
LinkOption...
options determining how the symbolic links should be handled
linkOptions_
)

Implements org.graalvm.polyglot.io.FileSystem.checkAccess.

Checks existence and accessibility of a file.

public void
copy(Path
the path to file to copy
source_
,
Path
the path to the target file
target_
,
CopyOption...
the options specifying how the copy should be performed, see StandardCopyOption
options_
)

Overrides default org.graalvm.polyglot.io.FileSystem.copy.

Copies source file to target file.

public void
createDirectory(Path
the directory to create
dir_
,
FileAttribute<?>...
the optional attributes to set atomically when creating the directory
attrs_
)

Implements org.graalvm.polyglot.io.FileSystem.createDirectory.

Creates a directory.

public void
delete(Path
the path to the file to delete
path_
)

Implements org.graalvm.polyglot.io.FileSystem.delete.

Deletes a file.

public boolean
equals(Object
the reference object with which to compare.
obj_
)

Overrides org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem.equals.

Indicates whether some other object is "equal to" this one.

public Charset
getEncoding(Path
the file to find an file encoding for
path_
)

Overrides default org.graalvm.polyglot.io.FileSystem.getEncoding.

Returns an file encoding for given path.

public String
getMimeType(Path
the file to find a MIME type for
path_
)

Overrides default org.graalvm.polyglot.io.FileSystem.getMimeType.

Returns a MIME type for given path.

public String
getPathSeparator()

Overrides default org.graalvm.polyglot.io.FileSystem.getPathSeparator.

Returns the path separator used to separate filenames in a path list.

public String
getSeparator()

Overrides default org.graalvm.polyglot.io.FileSystem.getSeparator.

Returns the name separator used to separate names in a path string.

public Path
getTempDirectory()

Overrides default org.graalvm.polyglot.io.FileSystem.getTempDirectory.

Returns the default temporary directory.

private static <T extends Throwable> RuntimeException
public int
public boolean
isSameFile(Path
the path to the file
path1_
,
Path
the other path
path2_
,
LinkOption...
the options determining how the symbolic links should be handled
options_
)

Overrides default org.graalvm.polyglot.io.FileSystem.isSameFile.

Tests if the given paths refer to the same physical file.

public void
move(Path
the path to file to move
source_
,
Path
the path to the target file
target_
,
CopyOption...
the options specifying how the move should be performed, see StandardCopyOption
options_
)

Overrides default org.graalvm.polyglot.io.FileSystem.move.

Moves (renames) source file to target file.

public SeekableByteChannel
newByteChannel(Path
the path to the file to open
path_
,
Set<? extends OpenOption>
the options specifying how the file should be opened
options_
,
FileAttribute<?>...
the optional attributes to set atomically when creating the new file
attrs_
)

Implements org.graalvm.polyglot.io.FileSystem.newByteChannel.

Opens or creates a file returning a SeekableByteChannel to access the file content.

public DirectoryStream<Path>
newDirectoryStream(Path
the path to the directory to iterate entries for
dir_
,
DirectoryStream.Filter<? super Path>
the filter
filter_
)

Implements org.graalvm.polyglot.io.FileSystem.newDirectoryStream.

Returns directory entries.

public Path
parsePath(String
the string path to be converted to Path
path_
)

Implements org.graalvm.polyglot.io.FileSystem.parsePath.

Parses a path from a String.

public Path
parsePath(URI
the URI to be converted to Path
uri_
)

Implements org.graalvm.polyglot.io.FileSystem.parsePath.

Parses a path from an URI.

public Map<String, Object>
readAttributes(Path
the path to file to read attributes for
path_
,
String
the attributes to read. The attributes parameter has the form: [view-name:]attribute-list. The optional view-name corresponds to FileAttributeView#name() and determines the set of attributes, the default value is "basic". The attribute-list is a comma separated list of attributes. If the attribute-list contains '*' then all the attributes from given view are read.
attributes_
,
LinkOption...
the options determining how the symbolic links should be handled
options_
)

Implements org.graalvm.polyglot.io.FileSystem.readAttributes.

Reads a file's attributes as a bulk operation.

public void
setAttribute(Path
the path to file to set an attribute to
path_
,
String
the attribute to set. The attribute parameter has the form: [view-name:]attribute-name. The optional view-name corresponds to FileAttributeView#name() and determines the set of attributes, the default value is "basic". The attribute-name is a name of an attribute.
attribute_
,
Object
the attribute value
value_
,
LinkOption...
the options determining how the symbolic links should be handled
options_
)

Overrides default org.graalvm.polyglot.io.FileSystem.setAttribute.

Sets a file's attribute.

public void
setCurrentWorkingDirectory(Path
the new current working directory
currentWorkingDirectory_
)

Overrides default org.graalvm.polyglot.io.FileSystem.setCurrentWorkingDirectory.

Sets the current working directory.

public Path
toAbsolutePath(Path
the path to resolve, may be a non normalized path
path_
)

Implements org.graalvm.polyglot.io.FileSystem.toAbsolutePath.

Resolves given path to an absolute path.

public Path
toRealPath(Path
the path to resolve, may be a non normalized path
path_
,
LinkOption...
options determining how the symbolic links should be handled
linkOptions_
)

Implements org.graalvm.polyglot.io.FileSystem.toRealPath.

Returns the real (canonical) path of an existing file.

public String
toString()

Overrides org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem.toString.

Returns a string representation of the object.

Inherited from org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem:
methodHandleLookup

Field Detail

HANDLESback to summary
private static final ModuleToUnnamedFileSystemGen.Handles HANDLES
receiverback to summary
pack-priv final Object receiver

Constructor Detail

ModuleToUnnamedFileSystemGenback to summary
public ModuleToUnnamedFileSystemGen(Object receiver)

Method Detail

checkAccessback to summary
public void checkAccess(Path path_, Set<? extends AccessMode> modes_, LinkOption... linkOptions_)

Implements org.graalvm.polyglot.io.FileSystem.checkAccess.

Doc from org.graalvm.polyglot.io.FileSystem.checkAccess.

Checks existence and accessibility of a file.

Parameters
path_:Path

the path to the file to check

modes_:Set<? extends AccessMode>

the access modes to check, possibly empty to check existence only.

linkOptions_:LinkOption[]

options determining how the symbolic links should be handled

Annotations
@Override
copyback to summary
public void copy(Path source_, Path target_, CopyOption... options_)

Overrides default org.graalvm.polyglot.io.FileSystem.copy.

Doc from org.graalvm.polyglot.io.FileSystem.copy.

Copies source file to target file.

Parameters
source_:Path

the path to file to copy

target_:Path

the path to the target file

options_:CopyOption[]

the options specifying how the copy should be performed, see StandardCopyOption

Annotations
@Override
createDirectoryback to summary
public void createDirectory(Path dir_, FileAttribute<?>... attrs_)

Implements org.graalvm.polyglot.io.FileSystem.createDirectory.

Doc from org.graalvm.polyglot.io.FileSystem.createDirectory.

Creates a directory.

Parameters
dir_:Path

the directory to create

attrs_:FileAttribute<?>[]

the optional attributes to set atomically when creating the directory

Annotations
@Override
deleteback to summary
public void delete(Path path_)

Implements org.graalvm.polyglot.io.FileSystem.delete.

Doc from org.graalvm.polyglot.io.FileSystem.delete.

Deletes a file.

Parameters
path_:Path

the path to the file to delete

Annotations
@Override
equalsback to summary
public boolean equals(Object obj_)

Overrides org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj_:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getEncodingback to summary
public Charset getEncoding(Path path_)

Overrides default org.graalvm.polyglot.io.FileSystem.getEncoding.

Doc from org.graalvm.polyglot.io.FileSystem.getEncoding.

Returns an file encoding for given path. An optional operation for filesystem implementations which can provide file encodings in an efficient way.

Parameters
path_:Path

the file to find an file encoding for

Returns:Charset

the file encoding or null if the file encoding is not detected or the filesystem does not support file encoding detection

Annotations
@Override
getMimeTypeback to summary
public String getMimeType(Path path_)

Overrides default org.graalvm.polyglot.io.FileSystem.getMimeType.

Doc from org.graalvm.polyglot.io.FileSystem.getMimeType.

Returns a MIME type for given path. An optional operation for filesystem implementations which can provide MIME types in an efficient way.

Parameters
path_:Path

the file to find a MIME type for

Returns:String

the MIME type or null if the MIME type is not recognized or the filesystem does not support MIME type detection

Annotations
@Override
getPathSeparatorback to summary
public String getPathSeparator()

Overrides default org.graalvm.polyglot.io.FileSystem.getPathSeparator.

Doc from org.graalvm.polyglot.io.FileSystem.getPathSeparator.

Returns the path separator used to separate filenames in a path list. On UNIX the path separator is ':'. On Windows it's ';'.

Returns:String

the path separator

Annotations
@Override
getSeparatorback to summary
public String getSeparator()

Overrides default org.graalvm.polyglot.io.FileSystem.getSeparator.

Doc from org.graalvm.polyglot.io.FileSystem.getSeparator.

Returns the name separator used to separate names in a path string. The separator is used when creating path strings by invoking the toString() method.

Returns:String

the name separator

Annotations
@Override
getTempDirectoryback to summary
public Path getTempDirectory()

Overrides default org.graalvm.polyglot.io.FileSystem.getTempDirectory.

Doc from org.graalvm.polyglot.io.FileSystem.getTempDirectory.

Returns the default temporary directory.

Annotations
@Override
handleException_back to summary
private static <T extends Throwable> RuntimeException handleException_(Throwable t) throws Throwable-:T
Annotations
@SuppressWarnings:unchecked
hashCodeback to summary
public int hashCode()

Overrides org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isSameFileback to summary
public boolean isSameFile(Path path1_, Path path2_, LinkOption... options_)

Overrides default org.graalvm.polyglot.io.FileSystem.isSameFile.

Doc from org.graalvm.polyglot.io.FileSystem.isSameFile.

Tests if the given paths refer to the same physical file. The default implementation firstly converts the paths into absolute paths. If the absolute paths are equal it returns true without checking if the file exists. Otherwise, this method converts the paths into canonical representations and tests the canonical paths for equality. The FileSystem may re-implement the method with a more efficient test. When re-implemented the method must have the same security privileges as the toAbsolutePath and toRealPath.

Parameters
path1_:Path

the path to the file

path2_:Path

the other path

options_:LinkOption[]

the options determining how the symbolic links should be handled

Returns:boolean

true if the given paths refer to the same physical file

Annotations
@Override
moveback to summary
public void move(Path source_, Path target_, CopyOption... options_)

Overrides default org.graalvm.polyglot.io.FileSystem.move.

Doc from org.graalvm.polyglot.io.FileSystem.move.

Moves (renames) source file to target file.

Parameters
source_:Path

the path to file to move

target_:Path

the path to the target file

options_:CopyOption[]

the options specifying how the move should be performed, see StandardCopyOption

Annotations
@Override
newByteChannelback to summary
public SeekableByteChannel newByteChannel(Path path_, Set<? extends OpenOption> options_, FileAttribute<?>... attrs_)

Implements org.graalvm.polyglot.io.FileSystem.newByteChannel.

Doc from org.graalvm.polyglot.io.FileSystem.newByteChannel.

Opens or creates a file returning a SeekableByteChannel to access the file content.

Parameters
path_:Path

the path to the file to open

options_:Set<? extends OpenOption>

the options specifying how the file should be opened

attrs_:FileAttribute<?>[]

the optional attributes to set atomically when creating the new file

Returns:SeekableByteChannel

the created SeekableByteChannel

Annotations
@Override
newDirectoryStreamback to summary
public DirectoryStream<Path> newDirectoryStream(Path dir_, DirectoryStream.Filter<? super Path> filter_)

Implements org.graalvm.polyglot.io.FileSystem.newDirectoryStream.

Doc from org.graalvm.polyglot.io.FileSystem.newDirectoryStream.

Returns directory entries.

Parameters
dir_:Path

the path to the directory to iterate entries for

filter_:DirectoryStream.Filter<? super Path>

the filter

Returns:DirectoryStream<Path>

the new DirectoryStream

Annotations
@Override
parsePathback to summary
public Path parsePath(String path_)

Implements org.graalvm.polyglot.io.FileSystem.parsePath.

Doc from org.graalvm.polyglot.io.FileSystem.parsePath.

Parses a path from a String. This method is called only on the FileSystem with file scheme.

Parameters
path_:String

the string path to be converted to Path

Returns:Path

the Path

Annotations
@Override
parsePathback to summary
public Path parsePath(URI uri_)

Implements org.graalvm.polyglot.io.FileSystem.parsePath.

Doc from org.graalvm.polyglot.io.FileSystem.parsePath.

Parses a path from an URI.

Parameters
uri_:URI

the URI to be converted to Path

Returns:Path

the Path representing given URI

Annotations
@Override
readAttributesback to summary
public Map<String, Object> readAttributes(Path path_, String attributes_, LinkOption... options_)

Implements org.graalvm.polyglot.io.FileSystem.readAttributes.

Doc from org.graalvm.polyglot.io.FileSystem.readAttributes.

Reads a file's attributes as a bulk operation.

Parameters
path_:Path

the path to file to read attributes for

attributes_:String

the attributes to read. The attributes parameter has the form: [view-name:]attribute-list. The optional view-name corresponds to FileAttributeView#name() and determines the set of attributes, the default value is "basic". The attribute-list is a comma separated list of attributes. If the attribute-list contains '*' then all the attributes from given view are read.

options_:LinkOption[]

the options determining how the symbolic links should be handled

Returns:Map<String, Object>

the Map containing the file attributes. The map's keys are attribute names, map's values are the attribute values. The map may contain a subset of required attributes in case when the FileSystem does not support some of the required attributes.

Annotations
@Override
setAttributeback to summary
public void setAttribute(Path path_, String attribute_, Object value_, LinkOption... options_)

Overrides default org.graalvm.polyglot.io.FileSystem.setAttribute.

Doc from org.graalvm.polyglot.io.FileSystem.setAttribute.

Sets a file's attribute.

Parameters
path_:Path

the path to file to set an attribute to

attribute_:String

the attribute to set. The attribute parameter has the form: [view-name:]attribute-name. The optional view-name corresponds to FileAttributeView#name() and determines the set of attributes, the default value is "basic". The attribute-name is a name of an attribute.

value_:Object

the attribute value

options_:LinkOption[]

the options determining how the symbolic links should be handled

Annotations
@Override
setCurrentWorkingDirectoryback to summary
public void setCurrentWorkingDirectory(Path currentWorkingDirectory_)

Overrides default org.graalvm.polyglot.io.FileSystem.setCurrentWorkingDirectory.

Doc from org.graalvm.polyglot.io.FileSystem.setCurrentWorkingDirectory.

Sets the current working directory. The current working directory is used to resolve non absolute paths in FileSystem operations.

Parameters
currentWorkingDirectory_:Path

the new current working directory

Annotations
@Override
toAbsolutePathback to summary
public Path toAbsolutePath(Path path_)

Implements org.graalvm.polyglot.io.FileSystem.toAbsolutePath.

Doc from org.graalvm.polyglot.io.FileSystem.toAbsolutePath.

Resolves given path to an absolute path.

Parameters
path_:Path

the path to resolve, may be a non normalized path

Returns:Path

an absolute Path

Annotations
@Override
toRealPathback to summary
public Path toRealPath(Path path_, LinkOption... linkOptions_)

Implements org.graalvm.polyglot.io.FileSystem.toRealPath.

Doc from org.graalvm.polyglot.io.FileSystem.toRealPath.

Returns the real (canonical) path of an existing file.

Parameters
path_:Path

the path to resolve, may be a non normalized path

linkOptions_:LinkOption[]

options determining how the symbolic links should be handled

Returns:Path

an absolute canonical path

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.graalvm.polyglot.impl.ModuleToUnnamedBridge.ModuleToUnnamedFileSystem.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.graalvm.polyglot.impl back to summary

pack-priv final Class ModuleToUnnamedFileSystemGen.Handles

extends Object
Class Inheritance
  • java.lang.Object
  • org.graalvm.polyglot.impl.ModuleToUnnamedFileSystemGen.Handles

Field Summary

Modifier and TypeField and Description
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle
private final MethodHandle

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

checkAccess_back to summary
private final MethodHandle checkAccess_
copy_back to summary
private final MethodHandle copy_
createDirectory_back to summary
private final MethodHandle createDirectory_
delete_back to summary
private final MethodHandle delete_
equals_back to summary
private final MethodHandle equals_
getEncoding_back to summary
private final MethodHandle getEncoding_
getMimeType_back to summary
private final MethodHandle getMimeType_
getPathSeparator_back to summary
private final MethodHandle getPathSeparator_
getSeparator_back to summary
private final MethodHandle getSeparator_
getTempDirectory_back to summary
private final MethodHandle getTempDirectory_
hashCode_back to summary
private final MethodHandle hashCode_
isSameFile_back to summary
private final MethodHandle isSameFile_
move_back to summary
private final MethodHandle move_
newByteChannel_back to summary
private final MethodHandle newByteChannel_
newDirectoryStream_back to summary
private final MethodHandle newDirectoryStream_
parsePath1_back to summary
private final MethodHandle parsePath1_
parsePath_back to summary
private final MethodHandle parsePath_
readAttributes_back to summary
private final MethodHandle readAttributes_
setAttribute_back to summary
private final MethodHandle setAttribute_
setCurrentWorkingDirectory_back to summary
private final MethodHandle setCurrentWorkingDirectory_
toAbsolutePath_back to summary
private final MethodHandle toAbsolutePath_
toRealPath_back to summary
private final MethodHandle toRealPath_
toString_back to summary
private final MethodHandle toString_

Constructor Detail

Handlesback to summary
pack-priv Handles(MethodHandles.Lookup lookup) throws ReflectiveOperationException