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 class
TargetDefinitionFile.AbstractPathLocation
class
TargetDefinitionFile.DirectoryTargetLocation
class
TargetDefinitionFile.FeatureTargetPlatformLocation
class
TargetDefinitionFile.IULocation
static class
TargetDefinitionFile.OtherLocation
class
TargetDefinitionFile.ProfileTargetPlatformLocation
static class
TargetDefinitionFile.Repository
static class
TargetDefinitionFile.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.Document
document
private de.pdark.decentxml.Element
dom
private byte[]
fileContentHash
(package private) IncludeSourceMode
includeSourceMode
private java.io.File
origin
private static de.pdark.decentxml.XMLParser
parser
-
Constructor Summary
Constructors Modifier Constructor Description private
TargetDefinitionFile(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)
boolean
equals(java.lang.Object obj)
java.util.List<? extends TargetDefinition.Location>
getLocations()
java.lang.String
getOrigin()
Returns the origin of the target definition, e.g.int
hashCode()
boolean
hasIncludedBundles()
Returnstrue
if the target definition specifies an explicit list of bundles to include (i.e.private static java.security.MessageDigest
newMD5Digest()
static TargetDefinitionFile
read(java.io.File file, IncludeSourceMode includeSourceMode)
static void
write(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:
getLocations
in interfaceTargetDefinition
-
hasIncludedBundles
public boolean hasIncludedBundles()
Description copied from interface:TargetDefinition
Returnstrue
if the target definition specifies an explicit list of bundles to include (i.e. an <includeBundles> in target definition files).- Specified by:
hasIncludedBundles
in interfaceTargetDefinition
-
getOrigin
public java.lang.String getOrigin()
Description copied from interface:TargetDefinition
Returns the origin of the target definition, e.g. a file path. Used for debugging only.- Specified by:
getOrigin
in 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:
hashCode
in interfaceTargetDefinition
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceTargetDefinition
- Overrides:
equals
in 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()
-
-