Package org.eclipse.tycho.core.ee
Class TargetDefinitionFile
- java.lang.Object
-
- org.eclipse.tycho.core.ee.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.FeaturesLocation, TargetDefinition.IncludeMode, TargetDefinition.InstallableUnitLocation, TargetDefinition.Location, TargetDefinition.PathLocation, TargetDefinition.ProfileLocation
-
-
Field Summary
Fields Modifier and Type Field Description private de.pdark.decentxml.Document
document
private de.pdark.decentxml.Element
dom
private static java.util.Map<java.lang.String,TargetDefinitionFile>
FILE_CACHE
private byte[]
fileContentHash
private java.io.File
origin
private static de.pdark.decentxml.XMLParser
PARSER
-
Constructor Summary
Constructors Modifier Constructor Description private
TargetDefinitionFile(java.io.File source)
-
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.java.lang.String
getTargetEE()
Returns the value of the targetJRE in *.target file if it's a known EE name.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)
java.lang.String
toString()
static void
write(TargetDefinitionFile target, java.io.File file)
-
-
-
Field Detail
-
PARSER
private static final de.pdark.decentxml.XMLParser PARSER
-
FILE_CACHE
private static final java.util.Map<java.lang.String,TargetDefinitionFile> FILE_CACHE
-
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
-
-
Constructor Detail
-
TargetDefinitionFile
private TargetDefinitionFile(java.io.File source) 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)
-
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()
-
getTargetEE
public java.lang.String getTargetEE()
Description copied from interface:TargetDefinition
Returns the value of the targetJRE in *.target file if it's a known EE name.null
will be returned otherwise.- Specified by:
getTargetEE
in interfaceTargetDefinition
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-