org.apache.tools.ant.types.resources.selectors

Class Name

public class Name extends Object implements ResourceSelector

Name ResourceSelector.

Since: Ant 1.7

Method Summary
booleandoesHandledirSep()
Whether the difference between / and \ (the two common directory characters) is ignored.
StringgetName()
Get the pattern used by this Name ResourceSelector.
StringgetRegex()
Get the regular expression used by this Name ResourceSelector.
booleanisCaseSensitive()
Learn whether this Name ResourceSelector is case-sensitive.
booleanisSelected(Resource r)
Return true if this Resource is selected.
voidsetCaseSensitive(boolean b)
Set whether the name comparisons are case-sensitive.
voidsetHandleDirSep(boolean handleDirSep)
Attribute specifing whether to ignore the difference between / and \ (the two common directory characters).
voidsetName(String n)
Set the pattern to compare names against.
voidsetProject(Project p)
voidsetRegex(String r)
Set the regular expression to compare names against.

Method Detail

doesHandledirSep

public boolean doesHandledirSep()
Whether the difference between / and \ (the two common directory characters) is ignored.

Since: Ant 1.8.0

getName

public String getName()
Get the pattern used by this Name ResourceSelector.

Returns: the String selection pattern.

getRegex

public String getRegex()
Get the regular expression used by this Name ResourceSelector.

Returns: the String selection pattern.

Since: Ant 1.8.0

isCaseSensitive

public boolean isCaseSensitive()
Learn whether this Name ResourceSelector is case-sensitive.

Returns: boolean case-sensitivity flag.

isSelected

public boolean isSelected(Resource r)
Return true if this Resource is selected.

Parameters: r the Resource to check.

Returns: whether the Resource was selected.

setCaseSensitive

public void setCaseSensitive(boolean b)
Set whether the name comparisons are case-sensitive.

Parameters: b boolean case-sensitivity flag.

setHandleDirSep

public void setHandleDirSep(boolean handleDirSep)
Attribute specifing whether to ignore the difference between / and \ (the two common directory characters).

Parameters: handleDirSep a boolean, default is false.

Since: Ant 1.8.0

setName

public void setName(String n)
Set the pattern to compare names against.

Parameters: n the pattern String to set.

setProject

public void setProject(Project p)

setRegex

public void setRegex(String r)
Set the regular expression to compare names against.

Parameters: r the regex to set.

Since: Ant 1.8.0