Package org.flywaydb.core.api
Class Location
- java.lang.Object
-
- org.flywaydb.core.api.Location
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILESYSTEM_PREFIX
The prefix for filesystem locations.
-
Constructor Summary
Constructors Constructor Description Location(java.lang.String descriptor)
Creates a new location.
-
Method Summary
Modifier and Type Method Description int
compareTo(Location o)
boolean
equals(java.lang.Object o)
java.lang.String
getDescriptor()
java.lang.String
getPath()
java.lang.String
getPrefix()
int
hashCode()
boolean
isClassPath()
Checks whether this denotes a location on the classpath.boolean
isFileSystem()
Checks whether this denotes a location on the filesystem.boolean
isParentOf(Location other)
Checks whether this location is a parent of this other location.java.lang.String
toString()
-
-
-
Field Detail
-
FILESYSTEM_PREFIX
public static final java.lang.String FILESYSTEM_PREFIX
The prefix for filesystem locations.- See Also:
- Constant Field Values
-
-
Method Detail
-
isClassPath
public boolean isClassPath()
Checks whether this denotes a location on the classpath.- Returns:
true
if it does,false
if it doesn't.
-
isFileSystem
public boolean isFileSystem()
Checks whether this denotes a location on the filesystem.- Returns:
true
if it does,false
if it doesn't.
-
isParentOf
public boolean isParentOf(Location other)
Checks whether this location is a parent of this other location.- Parameters:
other
- The other location.- Returns:
true
if it is,false
if it isn't.
-
getPrefix
public java.lang.String getPrefix()
- Returns:
- The prefix part of the location. Can be either classpath: or filesystem:.
-
getPath
public java.lang.String getPath()
- Returns:
- The path part of the location.
-
getDescriptor
public java.lang.String getDescriptor()
- Returns:
- The complete location descriptor.
-
compareTo
public int compareTo(Location o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Location>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- The complete location descriptor.
-
-