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 StringThe context which this path represents; immutable so we're thread-safe.private static final LoggerLoggerFields inherited from interface 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 TypeMethodDescriptionintcompareTo(ArchivePath path) booleanget()Obtains the context which thisArchivePathrepresentsObtains the parent of this Path, if exists, else null.inthashCode()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
-
-
Method Details
-
get
Obtains the context which thisArchivePathrepresents- Specified by:
getin 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:
getParentin interfaceArchivePath- Returns:
- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<ArchivePath>- See Also:
-
hashCode
-
equals
-
toString
-