Package org.eclipse.tycho.p2.target.ee
Class StandardEEResolutionHints
- java.lang.Object
-
- org.eclipse.tycho.p2.target.ee.StandardEEResolutionHints
-
- All Implemented Interfaces:
ExecutionEnvironmentResolutionHints
public final class StandardEEResolutionHints extends java.lang.Object implements ExecutionEnvironmentResolutionHints
Resolution hints for a standard execution environment, e.g. "CDC-1.0/Foundation-1.0" or "JavaSE-1.7"
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit>
additionalUnits
private java.lang.String
executionEnvironment
private static java.lang.String
JRE_ACTION_FALLBACK_EE
private static java.lang.String
JRE_ACTION_FALLBACK_EE_PHOTON
private static org.eclipse.equinox.p2.metadata.Version
JRE_ACTION_FALLBACK_VERSION
private static org.eclipse.equinox.p2.metadata.Version
JRE_ACTION_FALLBACK_VERSION_PHOTON
private static java.lang.String
LAST_KNOWN_EE
This should be the most recent/encompassing EE that JREAction can create units for.private java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit>
temporaryUnits
-
Constructor Summary
Constructors Constructor Description StandardEEResolutionHints(java.lang.String executionEnvironment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static void
addIUsFromEnvironment(java.lang.String executionEnvironment, java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> units)
private static java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit>
computeAdditionalUnits(java.lang.String executionEnvironment)
Return IUs that represent packages provided by target JREprivate java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit>
computeTemporaryAdditions(java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> additionalUnits)
private static void
ensureEEWasKnownToJREAction(java.lang.String executionEnvironment, java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> eeUnits)
private static <T> boolean
eq(T left, T right)
boolean
equals(java.lang.Object obj)
java.util.Collection<org.eclipse.equinox.p2.metadata.IRequirement>
getMandatoryRequires()
Returns requirements to execution environment units to ensure that a) the execution environment units are available, and b) the units are used to the resolution result.java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit>
getMandatoryUnits()
Returns the list of installable units that shall be used during resolution.java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit>
getTemporaryAdditions()
Returns the list of installable units that shall be temporarily added to the list of installable units, i.e.int
hashCode()
boolean
isEESpecificationUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit unit)
Returnstrue
for the "a.jre" installable unit that contains the specification of the execution environment.boolean
isNonApplicableEEUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit iu)
p2 repositories are polluted with useless a.jre/config.a.jre IUs.private static void
put(java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> units, org.eclipse.equinox.p2.metadata.IInstallableUnit unit)
private static org.eclipse.equinox.p2.metadata.IInstallableUnit
removeExportedPackages(org.eclipse.equinox.p2.metadata.IInstallableUnit initialUnit)
-
-
-
Field Detail
-
JRE_ACTION_FALLBACK_EE
private static final java.lang.String JRE_ACTION_FALLBACK_EE
- See Also:
- Constant Field Values
-
JRE_ACTION_FALLBACK_VERSION
private static final org.eclipse.equinox.p2.metadata.Version JRE_ACTION_FALLBACK_VERSION
-
JRE_ACTION_FALLBACK_EE_PHOTON
private static final java.lang.String JRE_ACTION_FALLBACK_EE_PHOTON
- See Also:
- Constant Field Values
-
JRE_ACTION_FALLBACK_VERSION_PHOTON
private static final org.eclipse.equinox.p2.metadata.Version JRE_ACTION_FALLBACK_VERSION_PHOTON
-
LAST_KNOWN_EE
private static final java.lang.String LAST_KNOWN_EE
This should be the most recent/encompassing EE that JREAction can create units for.- See Also:
- Constant Field Values
-
executionEnvironment
private final java.lang.String executionEnvironment
-
additionalUnits
private final java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> additionalUnits
-
temporaryUnits
private final java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> temporaryUnits
-
-
Method Detail
-
isNonApplicableEEUnit
public boolean isNonApplicableEEUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit iu)
p2 repositories are polluted with useless a.jre/config.a.jre IUs. These IUs do not represent current/desired JRE and can expose resolver to packages that are not actually available.- Specified by:
isNonApplicableEEUnit
in interfaceExecutionEnvironmentResolutionHints
-
isEESpecificationUnit
public boolean isEESpecificationUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit unit)
Description copied from interface:ExecutionEnvironmentResolutionHints
Returnstrue
for the "a.jre" installable unit that contains the specification of the execution environment. This method is used for finding the specification unit of custom profiles.- Specified by:
isEESpecificationUnit
in interfaceExecutionEnvironmentResolutionHints
-
computeAdditionalUnits
private static java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> computeAdditionalUnits(java.lang.String executionEnvironment)
Return IUs that represent packages provided by target JRE- Parameters:
executionEnvironment
-
-
addIUsFromEnvironment
static void addIUsFromEnvironment(java.lang.String executionEnvironment, java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> units)
-
ensureEEWasKnownToJREAction
private static void ensureEEWasKnownToJREAction(java.lang.String executionEnvironment, java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> eeUnits)
-
getMandatoryUnits
public java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getMandatoryUnits()
Description copied from interface:ExecutionEnvironmentResolutionHints
Returns the list of installable units that shall be used during resolution. These units are added to the available units so that requirements of the capabilities of the execution environment can be resolved, and their use during resolution is enforced so that other units providing the same capabilities are not used (unless they are needed for other reasons).- Specified by:
getMandatoryUnits
in interfaceExecutionEnvironmentResolutionHints
-
getMandatoryRequires
public java.util.Collection<org.eclipse.equinox.p2.metadata.IRequirement> getMandatoryRequires()
Description copied from interface:ExecutionEnvironmentResolutionHints
Returns requirements to execution environment units to ensure that a) the execution environment units are available, and b) the units are used to the resolution result.- Specified by:
getMandatoryRequires
in interfaceExecutionEnvironmentResolutionHints
-
computeTemporaryAdditions
private java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> computeTemporaryAdditions(java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> additionalUnits)
-
removeExportedPackages
private static org.eclipse.equinox.p2.metadata.IInstallableUnit removeExportedPackages(org.eclipse.equinox.p2.metadata.IInstallableUnit initialUnit)
-
getTemporaryAdditions
public java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getTemporaryAdditions()
Description copied from interface:ExecutionEnvironmentResolutionHints
Returns the list of installable units that shall be temporarily added to the list of installable units, i.e. they shall be available during resolution but must be removed from the resolution result.- Specified by:
getTemporaryAdditions
in interfaceExecutionEnvironmentResolutionHints
-
put
private static void put(java.util.Map<org.eclipse.equinox.p2.metadata.VersionedId,org.eclipse.equinox.p2.metadata.IInstallableUnit> units, org.eclipse.equinox.p2.metadata.IInstallableUnit unit)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceExecutionEnvironmentResolutionHints
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceExecutionEnvironmentResolutionHints
- Overrides:
equals
in classjava.lang.Object
-
eq
private static <T> boolean eq(T left, T right)
-
-