Package org.eclipse.tycho.p2.resolver
Class TargetDefinitionFile
- java.lang.Object
-
- org.eclipse.tycho.p2.resolver.TargetDefinitionFile
-
- All Implemented Interfaces:
TargetDefinition
public final class TargetDefinitionFile extends java.lang.Object implements TargetDefinition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classTargetDefinitionFile.AbstractPathLocationclassTargetDefinitionFile.DirectoryTargetLocationclassTargetDefinitionFile.FeatureTargetPlatformLocationclassTargetDefinitionFile.IULocationstatic classTargetDefinitionFile.OtherLocationclassTargetDefinitionFile.ProfileTargetPlatformLocationstatic classTargetDefinitionFile.Repositorystatic classTargetDefinitionFile.Unit-
Nested classes/interfaces inherited from interface org.eclipse.tycho.p2.target.facade.TargetDefinition
TargetDefinition.DirectoryLocation, TargetDefinition.FeaturePlatformLocation, TargetDefinition.IncludeMode, TargetDefinition.InstallableUnitLocation, TargetDefinition.Location, TargetDefinition.PathLocation, TargetDefinition.ProfilePlatformLocation
-
-
Field Summary
Fields Modifier and Type Field Description private de.pdark.decentxml.Documentdocumentprivate de.pdark.decentxml.Elementdomprivate byte[]fileContentHash(package private) IncludeSourceModeincludeSourceModeprivate java.io.Fileoriginprivate static de.pdark.decentxml.XMLParserparser
-
Constructor Summary
Constructors Modifier Constructor Description privateTargetDefinitionFile(java.io.File source, IncludeSourceMode includeSourceMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte[]computeFileContentHash(java.io.File source)private static byte[]computeMD5Digest(java.io.FileInputStream in)booleanequals(java.lang.Object obj)java.util.List<? extends TargetDefinition.Location>getLocations()java.lang.StringgetOrigin()Returns the origin of the target definition, e.g.inthashCode()booleanhasIncludedBundles()Returnstrueif the target definition specifies an explicit list of bundles to include (i.e.private static java.security.MessageDigestnewMD5Digest()static TargetDefinitionFileread(java.io.File file, IncludeSourceMode includeSourceMode)static voidwrite(TargetDefinitionFile target, java.io.File file)
-
-
-
Field Detail
-
parser
private static de.pdark.decentxml.XMLParser parser
-
origin
private final java.io.File origin
-
fileContentHash
private final byte[] fileContentHash
-
dom
private final de.pdark.decentxml.Element dom
-
document
private final de.pdark.decentxml.Document document
-
includeSourceMode
final IncludeSourceMode includeSourceMode
-
-
Constructor Detail
-
TargetDefinitionFile
private TargetDefinitionFile(java.io.File source, IncludeSourceMode includeSourceMode) throws TargetDefinitionSyntaxException- Throws:
TargetDefinitionSyntaxException
-
-
Method Detail
-
getLocations
public java.util.List<? extends TargetDefinition.Location> getLocations()
- Specified by:
getLocationsin interfaceTargetDefinition
-
hasIncludedBundles
public boolean hasIncludedBundles()
Description copied from interface:TargetDefinitionReturnstrueif the target definition specifies an explicit list of bundles to include (i.e. an <includeBundles> in target definition files).- Specified by:
hasIncludedBundlesin interfaceTargetDefinition
-
getOrigin
public java.lang.String getOrigin()
Description copied from interface:TargetDefinitionReturns the origin of the target definition, e.g. a file path. Used for debugging only.- Specified by:
getOriginin interfaceTargetDefinition
-
read
public static TargetDefinitionFile read(java.io.File file, IncludeSourceMode includeSourceMode)
-
write
public static void write(TargetDefinitionFile target, java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceTargetDefinition- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfaceTargetDefinition- Overrides:
equalsin classjava.lang.Object
-
computeFileContentHash
private static byte[] computeFileContentHash(java.io.File source)
-
computeMD5Digest
private static byte[] computeMD5Digest(java.io.FileInputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
newMD5Digest
private static java.security.MessageDigest newMD5Digest()
-
-