Class BasicPath
java.lang.Object
org.jboss.shrinkwrap.impl.base.path.BasicPath
- All Implemented Interfaces:
Comparable<ArchivePath>
,ArchivePath
A Path which may be optionally prefixed with some common namespace context at construction time. Thread-safe.
- Version:
- $Revision: $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The context which this path represents; immutable so we're thread-safe.private static final Logger
LoggerFields inherited from interface org.jboss.shrinkwrap.api.ArchivePath
SEPARATOR, SEPARATOR_STRING
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Path representing the root contextCreates a new Path with the specified contextCreates a new Path using the specified base and specified relative context.BasicPath
(String basePath, ArchivePath context) Creates a new Path using the specified base and specified relative context.BasicPath
(ArchivePath basePath, String context) Creates a new Path using the specified base and specified relative context.BasicPath
(ArchivePath basePath, ArchivePath context) Creates a new Path using the specified base and specified relative context. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ArchivePath path) boolean
get()
Obtains the context which thisArchivePath
representsObtains the parent of this Path, if exists, else null.int
hashCode()
toString()
-
Field Details
-
log
Logger -
context
The context which this path represents; immutable so we're thread-safe.
-
-
Constructor Details
-
BasicPath
public BasicPath()Creates a new Path representing the root context -
BasicPath
Creates a new Path with the specified context- Parameters:
context
- The context which this path represents. Null or blank represents the root. Relative paths will be adjusted to absolute form.
-
BasicPath
Creates a new Path using the specified base and specified relative context.- Parameters:
basePath
-context
-
-
BasicPath
Creates a new Path using the specified base and specified relative context.- Parameters:
basePath
-context
-
-
BasicPath
Creates a new Path using the specified base and specified relative context.- Parameters:
basePath
-context
-
-
BasicPath
Creates a new Path using the specified base and specified relative context.- Parameters:
basePath
-context
-
-
-
Method Details
-
get
Obtains the context which thisArchivePath
represents- Specified by:
get
in interfaceArchivePath
- Returns:
- See Also:
-
getParent
Obtains the parent of this Path, if exists, else null. For instance if the Path is "/my/path", the parent will be "/my". Each call will result in a new object reference, though subsequent calls upon the same Path will be equal by value.- Specified by:
getParent
in interfaceArchivePath
- Returns:
- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ArchivePath>
- See Also:
-
hashCode
public int hashCode() -
equals
-
toString
-