public interface IClasspathAttribute
newClasspathAttribute(String name, String value)
.JavaCore.newContainerEntry(
org.eclipse.core.runtime.IPath containerPath,
IAccessRule[] accessRules,
IClasspathAttribute[] extraAttributes,
boolean isExported)
,
JavaCore.newLibraryEntry(
org.eclipse.core.runtime.IPath path,
org.eclipse.core.runtime.IPath sourceAttachmentPath,
org.eclipse.core.runtime.IPath sourceAttachmentRootPath,
IAccessRule[] accessRules,
IClasspathAttribute[] extraAttributes,
boolean isExported)
,
JavaCore.newProjectEntry(
org.eclipse.core.runtime.IPath path,
IAccessRule[] accessRules,
boolean combineAccessRestrictions,
IClasspathAttribute[] extraAttributes,
boolean isExported)
,
JavaCore.newSourceEntry(
org.eclipse.core.runtime.IPath path,
org.eclipse.core.runtime.IPath[] inclusionPatterns,
org.eclipse.core.runtime.IPath[] exclusionPatterns,
org.eclipse.core.runtime.IPath specificOutputLocation,
IClasspathAttribute[] extraAttributes)
,
JavaCore.newVariableEntry(
org.eclipse.core.runtime.IPath variablePath,
org.eclipse.core.runtime.IPath variableSourceAttachmentPath,
org.eclipse.core.runtime.IPath variableSourceAttachmentRootPath,
IAccessRule[] accessRules,
IClasspathAttribute[] extraAttributes,
boolean isExported)
Modifier and Type | Field and Description |
---|---|
static String |
ADD_EXPORTS
Constant for the name of the add-exports attribute.
|
static String |
ADD_READS
Constant for the name of the add-reads attribute.
|
static String |
EXTERNAL_ANNOTATION_PATH
Constant for the name of the external annotation path attribute.
|
static String |
IGNORE_OPTIONAL_PROBLEMS
Constant for the name of the ignore optional compile problems attribute.
|
static String |
INDEX_LOCATION_ATTRIBUTE_NAME
Constant for the name of the index location attribute.
|
static String |
JAVADOC_LOCATION_ATTRIBUTE_NAME
Constant for the name of the javadoc location attribute.
|
static String |
LIMIT_MODULES
Constant for the name of the limit-modules attribute.
|
static String |
MODULE
Constant for the name of the module attribute.
|
static String |
MODULE_MAIN_CLASS
Constant of the name of the module-main-class attribute.
|
static String |
OPTIONAL
Constant for the name of the optional attribute.
|
static String |
PATCH_MODULE
Constant for the name of the patch-module attribute.
|
static String |
SOURCE_ATTACHMENT_ENCODING
Constant for the name of the encoding to be used for source attachments.
|
static String |
TEST
Constant for the name of the test attribute.
|
static String |
WITHOUT_TEST_CODE
Constant for the name of the without_test_code attribute.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of this classpath attribute.
|
String |
getValue()
Returns the value of this classpath attribute.
|
static final String JAVADOC_LOCATION_ATTRIBUTE_NAME
The value for this attribute has to be the string representation of a URL.
static final String INDEX_LOCATION_ATTRIBUTE_NAME
The value for this attribute has to be the string representation of a URL. It should point to an existing index file in a folder or a jar. The URL can also be of platform protocol.
static final String SOURCE_ATTACHMENT_ENCODING
The value of this attribute has to be a string representation of a valid encoding. The encoding for a source attachment is determined in the following order:
org.eclipse.core.resources.IFile#getCharset(false)
IFile.getCharset()
,
Constant Field Valuesstatic final String IGNORE_OPTIONAL_PROBLEMS
"true"
or
"false"
. When not present, "false"
is assumed.
If the value of this attribute is "true"
, all optional problems
from the source folder described by this classpath entry will not be reported
by the compiler.static final String OPTIONAL
"true"
or "false"
.
When not present, "false"
is assumed.
If the value of this attribute is "true"
, the classpath entry
is optional. If the underlying resource or jar file doesn't exist, no error
is reported and the classpath entry is ignored.static final String MODULE
"true"
or "false"
.
When not present, "false"
is assumed.
If the value of this attribute is "true"
, the classpath
entry is considered to be on the module path and will be treated as a
regular named module or as an automatic module.static final String ADD_EXPORTS
The value of this attribute must adhere to the syntax of javac's
--add-exports
command line option: <source-module>/<package>=<target-module>(,<target-module>)*
.
Multiple such options are packed as a ':' separated list into a single classpath attribute.
The given exports will be added at compile time.
Classpath entries with this attribute should also have a MODULE
attribute
with value "true"
.
static final String ADD_READS
The value of this attribute must adhere to the syntax of javac's
--add-reads
command line option: <source-module>=<target-module>
.
The given reads edge will be added at compile time.
static final String PATCH_MODULE
The value of this attribute must be the name of a module defined in the classpath entry, to which this attribute is attached.
This attribute is supported for classpath entries of kind
IClasspathEntry.CPE_CONTAINER
, IClasspathEntry.CPE_LIBRARY
and IClasspathEntry.CPE_PROJECT
.
A classpath entry having this attribute must also have the
MODULE
attribute with value "true"
.
static final String LIMIT_MODULES
The value of this attribute must be a comma-separated list of names of modules defined in the classpath entry, to which this attribute is attached. The set of modules observable through this entry will be limited to the transitive closure of modules in this list.
This attribute is supported for classpath entries of kind
IClasspathEntry.CPE_CONTAINER
.
A classpath entry having this attribute must also have the
MODULE
attribute with value "true"
.
static final String MODULE_MAIN_CLASS
The value of this attribute must be the name of a class defined in this module.
It will be used for generating the ModuleMainClass
attribute
in module-info.class
.
static final String EXTERNAL_ANNOTATION_PATH
The value for this attribute has to be the string representation of a path. It should point to an existing directory where external annotations can be found to support annotation based null analysis involving 3rd party libraries.
static final String TEST
The possible values for this attribute are "true"
or "false"
. When not present,
"false"
is assumed. If the value of this attribute is "true"
, and the classpath entry
is a source folder, it is assumed to contain test sources, otherwise main sources.
static final String WITHOUT_TEST_CODE
The possible values for this attribute are "true"
or "false"
. When not present,
"false"
is assumed. If the value of this attribute is "true"
, and the classpath entry
is a project, any test code reachable via that classpath entry will not be visible even to test sources.
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.