org.pf.tools.cda.base.model.workset
Class ClasspathPartDefinition

java.lang.Object
  extended by org.pf.tools.cda.base.model.workset.ClasspathPartDefinition
All Implemented Interfaces:
IStringRepresentation

public class ClasspathPartDefinition
extends java.lang.Object
implements IStringRepresentation

Specifies one or more classpath elements by a string pattern or an exact name.

Example: "/test/lib/*.jar"

Version:
1.6
Author:
Manfred Duchrow

Field Summary
static ClasspathPartDefinition[] EMPTY_ARRAY
           
 
Constructor Summary
ClasspathPartDefinition(java.lang.String definition)
          Initialize the new instance with a definition.
ClasspathPartDefinition(java.lang.String definition, ClasspathPartDefinitionType definitionType)
          Initialize the new instance with a definition and an explicit type.
ClasspathPartDefinition(java.lang.String definition, java.lang.String supplementary, ClasspathPartDefinitionType definitionType)
          Initialize the new instance with a definition, optional supplementary data and an explicit type.
 
Method Summary
static ClasspathPartDefinition[] collectionToArray(java.util.Collection coll)
           
 ClasspathPartDefinition copy()
          Returns a copy with the same definition content
 boolean equals(java.lang.Object object)
           
 java.lang.String getDefinition()
          Returns the definition as string
 java.lang.String getStringRepresentation()
           
 java.lang.String getSupplementaryData()
           
 ClasspathPartDefinitionType getType()
           
 int hashCode()
           
 boolean hasSupplementaryData()
           
 boolean isEclipseProjectClasspath()
          Returns true if this definition refers to the classpath file of an eclipse project.
 boolean isPattern()
          Returns true, if this definition is a pattern for more than one file.
 void setDefinition(java.lang.String newValue)
          Sets the definition as string
 void setSupplementaryData(java.lang.String newValue)
           
 void setType(ClasspathPartDefinitionType newValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final ClasspathPartDefinition[] EMPTY_ARRAY
Constructor Detail

ClasspathPartDefinition

public ClasspathPartDefinition(java.lang.String definition)
Initialize the new instance with a definition. That implies it is a definition of type BINARIES.


ClasspathPartDefinition

public ClasspathPartDefinition(java.lang.String definition,
                               ClasspathPartDefinitionType definitionType)
Initialize the new instance with a definition and an explicit type.


ClasspathPartDefinition

public ClasspathPartDefinition(java.lang.String definition,
                               java.lang.String supplementary,
                               ClasspathPartDefinitionType definitionType)
Initialize the new instance with a definition, optional supplementary data and an explicit type.

Method Detail

getDefinition

public java.lang.String getDefinition()
Returns the definition as string


getType

public ClasspathPartDefinitionType getType()

setType

public void setType(ClasspathPartDefinitionType newValue)

getSupplementaryData

public java.lang.String getSupplementaryData()

setSupplementaryData

public void setSupplementaryData(java.lang.String newValue)

collectionToArray

public static ClasspathPartDefinition[] collectionToArray(java.util.Collection coll)

hasSupplementaryData

public boolean hasSupplementaryData()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStringRepresentation

public java.lang.String getStringRepresentation()
Specified by:
getStringRepresentation in interface IStringRepresentation

isPattern

public boolean isPattern()
Returns true, if this definition is a pattern for more than one file. (e.g. "xxx/yyy/*.jar")


isEclipseProjectClasspath

public boolean isEclipseProjectClasspath()
Returns true if this definition refers to the classpath file of an eclipse project.


copy

public ClasspathPartDefinition copy()
Returns a copy with the same definition content


setDefinition

public void setDefinition(java.lang.String newValue)
Sets the definition as string


equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object