PatternSet.PatternFileNameEntry (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.types, class: PatternSet, class: PatternFileNameEntry

# Class PatternSet.PatternFileNameEntry

java.lang.Object
org.apache.tools.ant.types.PatternSet.NameEntry
org.apache.tools.ant.types.PatternSet.PatternFileNameEntry

Enclosing class:
  `PatternSet`

public class PatternSet.PatternFileNameEntry extends PatternSet.NameEntry
Adds encoding support to `PatternSet.NameEntry`.

Since:
  Ant 1.10.4

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PatternFileNameEntry()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final String`
  `getEncoding()`
  Encoding to use when reading the file, defaults to the platform's default encoding.
  `final void`
  `setEncoding(String encoding)`
  Encoding to use when reading the file, defaults to the platform's default encoding.
  `String`
  `toString()`

  ### Methods inherited from class PatternSet.NameEntry

  `evalName, getName, setIf, setIf, setName, setUnless, setUnless`
  Modifier and Type
  Method
  Description
  `String`
  `evalName(Project p)`
  This validates the name - checks the if and unless properties.
  `String`
  `getName()`
  `void`
  `setIf(Object cond)`
  Sets the if attribute.
  `void`
  `setIf(String cond)`
  Sets the if attribute.
  `void`
  `setName(String name)`
  Sets the name pattern.
  `void`
  `setUnless(Object cond)`
  Sets the unless attribute.
  `void`
  `setUnless(String cond)`
  Sets the unless attribute.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PatternFileNameEntry

    public PatternFileNameEntry()

- ## Method Details

  - ### setEncoding

    public final void setEncoding(String encoding)
    Encoding to use when reading the file, defaults to the platform's default encoding.

    For a list of possible values see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.

    Parameters:
      `encoding` - String

  - ### getEncoding

    public final String getEncoding()
    Encoding to use when reading the file, defaults to the platform's default encoding.
    Returns:
      the encoding name

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `PatternSet.NameEntry`
    Returns:
      a printable form of this object.