Package org.apache.commons.vfs2
Enum NameScope
- java.lang.Object
-
- java.lang.Enum<NameScope>
-
- org.apache.commons.vfs2.NameScope
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHILD
Resolve against the children of the base file.DESCENDENT
Resolve against the descendants of the base file.DESCENDENT_OR_SELF
Resolve against the descendants of the base file.FILE_SYSTEM
Resolve against files in the same file system as the base file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the name of the scope.java.lang.String
toString()
Returns the name of the scope.static NameScope
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NameScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CHILD
public static final NameScope CHILD
Resolve against the children of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a direct child of the base file.
-
DESCENDENT
public static final NameScope DESCENDENT
Resolve against the descendants of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a descendent of the base file.
-
DESCENDENT_OR_SELF
public static final NameScope DESCENDENT_OR_SELF
Resolve against the descendants of the base file. The name is resolved as described byFILE_SYSTEM
. However, an exception is thrown if the resolved file is not a descendent of the base file, or the base files itself.
-
FILE_SYSTEM
public static final NameScope FILE_SYSTEM
Resolve against files in the same file system as the base file.If the supplied name is an absolute path, then it is resolved relative to the root of the file system that the base file belongs to. If a relative name is supplied, then it is resolved relative to the base file.
The path may use any mix of
/
,\
, or file system specific separators to separate elements in the path. It may also contain.
and..
elements.A path is considered absolute if it starts with a separator character, and relative if it does not.
-
-
Method Detail
-
values
public static NameScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NameScope c : NameScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NameScope valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
Returns the name of the scope.- Overrides:
toString
in classjava.lang.Enum<NameScope>
- Returns:
- The name of the scope.
-
getName
public java.lang.String getName()
Returns the name of the scope.- Returns:
- The name of the scope.
-
-