|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.io.IOUtils
public class IOUtils
Helper Class for various I/O related things.
Field Summary | |
---|---|
static java.lang.String |
defaultEncoding
|
static java.lang.String |
eolChar
|
Method Summary | ||
---|---|---|
static java.io.File |
backupFile(java.io.File file)
|
|
static java.lang.String |
backupName(java.lang.String filename)
|
|
static void |
closeIgnoringExceptions(java.io.Closeable c)
Provides an implementation of closing a file for use in a finally block so you can correctly close a file without even more exception handling stuff. |
|
static java.io.Reader |
encodedInputStreamReader(java.io.InputStream stream,
java.lang.String encoding)
Create a Reader with an explicit encoding around an InputStream. |
|
static java.io.PrintWriter |
encodedOutputStreamPrintWriter(java.io.OutputStream stream,
java.lang.String encoding,
boolean autoFlush)
Create a Reader with an explicit encoding around an InputStream. |
|
static java.io.Writer |
encodedOutputStreamWriter(java.io.OutputStream stream,
java.lang.String encoding)
Create a Reader with an explicit encoding around an InputStream. |
|
static java.io.File |
ensureDir(java.io.File tgtDir)
Given a filepath, makes sure a directory exists there. |
|
static java.io.BufferedReader |
getBufferedFileReader(java.lang.String filename)
|
|
static java.io.BufferedReader |
getBufferedFileReader(java.lang.String filename,
java.lang.String encoding)
|
|
static java.io.BufferedReader |
getBufferedReaderFromClasspathOrFileSystem(java.lang.String filename)
|
|
static java.io.BufferedReader |
getBufferedReaderFromClasspathOrFileSystem(java.lang.String filename,
java.lang.String encoding)
|
|
static java.io.InputStream |
getBZip2PipedInputStream(java.lang.String filename)
|
|
static java.io.OutputStream |
getBZip2PipedOutputStream(java.lang.String filename)
|
|
static java.lang.String |
getExtension(java.lang.String fileName)
|
|
static java.io.InputStream |
getFileInputStream(java.lang.String filename)
Get a input file stream (automatically gunzip/bunzip2 depending on file extension) |
|
static java.io.OutputStream |
getFileOutputStream(java.lang.String filename)
Get a output file stream (automatically gzip/bzip2 depending on file extension) |
|
static java.io.InputStream |
getInputStreamFromURLOrClasspathOrFileSystem(java.lang.String textFileOrUrl)
Locates this file either using the given URL, or in the CLASSPATH, or in the file system The CLASSPATH takes priority over the file system! This stream is buffered and gunzipped (if necessary). |
|
static java.io.File |
getJNLPLocalScratch()
A JavaNLP specific convenience routine for obtaining the current scratch directory for the machine you're currently running on. |
|
static java.io.PrintWriter |
getPrintWriter(java.io.File textFile)
|
|
static java.io.PrintWriter |
getPrintWriter(java.lang.String filename)
|
|
static java.io.PrintWriter |
getPrintWriter(java.lang.String filename,
java.lang.String encoding)
|
|
static java.io.PrintWriter |
getPrintWriterIgnoringExceptions(java.lang.String filename)
|
|
static java.io.PrintWriter |
getPrintWriterOrDie(java.lang.String filename)
|
|
static java.lang.Iterable<java.io.File> |
iterFilesRecursive(java.io.File dir)
Iterate over all the files in the directory, recursively. |
|
static java.lang.Iterable<java.io.File> |
iterFilesRecursive(java.io.File dir,
java.util.regex.Pattern pattern)
Iterate over all the files in the directory, recursively. |
|
static java.lang.Iterable<java.io.File> |
iterFilesRecursive(java.io.File dir,
java.lang.String ext)
Iterate over all the files in the directory, recursively. |
|
static int |
lineCount(java.io.File textFile)
|
|
static java.util.List<java.lang.String> |
linesFromFile(java.lang.String filename)
Returns the contents of a file as a list of strings. |
|
static java.util.List<java.lang.String> |
linesFromFile(java.lang.String filename,
java.lang.String encoding)
Returns the contents of a file as a list of strings. |
|
static void |
main(java.lang.String[] args)
|
|
static java.io.InputStream |
openFile(java.io.File file)
Quietly opens a File. |
|
static java.util.Set<java.lang.String> |
readColumnSet(java.lang.String infile,
int field)
Read column as set |
|
static java.util.LinkedList<java.lang.String[]> |
readCSVStrictly(char[] csvContents,
int numColumns)
Read a CSV file character by character. |
|
static java.util.LinkedList<java.lang.String[]> |
readCSVStrictly(java.lang.String filename,
int numColumns)
|
|
static java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
readCSVWithHeader(java.lang.String path)
|
|
static java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
readCSVWithHeader(java.lang.String path,
char quoteChar,
char escapeChar)
Read in a CSV formatted file with a header row |
|
static java.lang.Iterable<java.lang.String> |
readLines(java.io.File file)
Returns an Iterable of the lines in the file. |
|
static java.lang.Iterable<java.lang.String> |
readLines(java.io.File file,
java.lang.Class<? extends java.io.InputStream> fileInputStreamWrapper)
Returns an Iterable of the lines in the file, wrapping the generated FileInputStream with an instance of the supplied class. |
|
static java.lang.Iterable<java.lang.String> |
readLines(java.lang.String path)
Returns an Iterable of the lines in the file. |
|
static java.util.Map<java.lang.String,java.lang.String> |
readMap(java.lang.String filename)
|
|
static
|
readObjectFromColumns(java.lang.Class objClass,
java.lang.String filename,
java.lang.String[] fieldNames,
java.lang.String delimiter)
|
|
static
|
readObjectFromFile(java.io.File file)
Read an object from a stored file. |
|
static
|
readObjectFromFile(java.lang.String filename)
Read an object from a stored file. |
|
static
|
readObjectFromFileNoExceptions(java.io.File file)
Read an object from a stored file without throwing exceptions. |
|
static
|
readObjectFromObjectStream(java.io.ObjectInputStream ois)
|
|
static
|
readObjectFromURLOrClasspathOrFileSystem(java.lang.String filename)
Read an object from a stored file. |
|
static java.io.BufferedReader |
readReaderFromString(java.lang.String textFileOrUrl)
|
|
static java.io.BufferedReader |
readReaderFromString(java.lang.String textFileOrUrl,
java.lang.String encoding)
Open a BufferedReader to a file or URL specified by a String name. |
|
static java.io.ObjectInputStream |
readStreamFromString(java.lang.String filenameOrUrl)
|
|
static boolean |
renameToBackupName(java.io.File file)
|
|
static java.lang.String |
slurpFile(java.io.File file)
Returns all the text in the given File. |
|
static java.lang.String |
slurpFile(java.io.File file,
java.lang.String encoding)
Returns all the text in the given File. |
|
static java.lang.String |
slurpFile(java.lang.String filename)
Returns all the text in the given file |
|
static java.lang.String |
slurpFile(java.lang.String filename,
java.lang.String encoding)
Returns all the text in the given file with the given encoding. |
|
static java.lang.String |
slurpFileNoExceptions(java.io.File file)
Returns all the text in the given File. |
|
static java.lang.String |
slurpFileNoExceptions(java.lang.String filename)
Returns all the text in the given File. |
|
static java.lang.String |
slurpFileNoExceptions(java.lang.String filename,
java.lang.String encoding)
Returns all the text in the given file with the given encoding. |
|
static java.lang.String |
slurpGBFile(java.lang.String filename)
|
|
static java.lang.String |
slurpGBFileNoExceptions(java.lang.String filename)
|
|
static java.lang.String |
slurpGBURL(java.net.URL u)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpGBURLNoExceptions(java.net.URL u)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpGZippedFile(java.io.File file)
Returns all the text in the given File. |
|
static java.lang.String |
slurpGZippedFile(java.lang.String filename)
Returns all the text in the given File. |
|
static java.lang.String |
slurpReader(java.io.Reader reader)
Returns all the text from the given Reader. |
|
static java.lang.String |
slurpURL(java.lang.String path)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpURL(java.net.URL u)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpURL(java.net.URL u,
java.lang.String encoding)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpURLNoExceptions(java.lang.String path)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpURLNoExceptions(java.net.URL u)
Returns all the text at the given URL. |
|
static java.lang.String |
slurpURLNoExceptions(java.net.URL u,
java.lang.String encoding)
Returns all the text at the given URL. |
|
static java.lang.String |
stringFromFile(java.lang.String filename)
Returns the contents of a file as a single string. |
|
static java.lang.String |
stringFromFile(java.lang.String filename,
java.lang.String encoding)
Returns the contents of a file as a single string. |
|
static java.io.File |
writeObjectToFile(java.lang.Object o,
java.io.File file)
Write an object to a specified File. |
|
static java.io.File |
writeObjectToFile(java.lang.Object o,
java.io.File file,
boolean append)
Write an object to a specified File. |
|
static java.io.File |
writeObjectToFile(java.lang.Object o,
java.lang.String filename)
Write object to a file with the specified name. |
|
static java.io.File |
writeObjectToFileNoExceptions(java.lang.Object o,
java.lang.String filename)
Write object to a file with the specified name. |
|
static java.io.File |
writeObjectToTempFile(java.lang.Object o,
java.lang.String filename)
Write object to temp file which is destroyed when the program exits. |
|
static java.io.File |
writeObjectToTempFileNoExceptions(java.lang.Object o,
java.lang.String filename)
Write object to a temp file and ignore exceptions. |
|
static java.io.ObjectOutputStream |
writeStreamFromString(java.lang.String serializePath)
|
|
static void |
writeStreamToStream(java.io.InputStream input,
java.io.OutputStream output)
Send all bytes from the input stream to the output stream. |
|
static void |
writeStringToFile(java.lang.String contents,
java.lang.String path,
java.lang.String encoding)
Writes a string to a file. |
|
static void |
writeStringToFileNoExceptions(java.lang.String contents,
java.lang.String path,
java.lang.String encoding)
Writes a string to a file, squashing exceptions |
|
static void |
writeStringToTempFile(java.lang.String contents,
java.lang.String path)
Writes a string to a temporary file, as UTF-8 |
|
static java.io.File |
writeStringToTempFile(java.lang.String contents,
java.lang.String path,
java.lang.String encoding)
Writes a string to a temporary file |
|
static void |
writeStringToTempFileNoExceptions(java.lang.String contents,
java.lang.String path)
Writes a string to a temporary file with UTF-8 encoding, squashing exceptions |
|
static java.io.File |
writeStringToTempFileNoExceptions(java.lang.String contents,
java.lang.String path,
java.lang.String encoding)
Writes a string to a temporary file, squashing exceptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String eolChar
public static final java.lang.String defaultEncoding
Method Detail |
---|
public static java.io.File writeObjectToFile(java.lang.Object o, java.lang.String filename) throws java.io.IOException
o
- Object to be written to filefilename
- Name of the temp file
java.io.IOException
- If can't write file.public static java.io.File writeObjectToFile(java.lang.Object o, java.io.File file) throws java.io.IOException
o
- Object to be written to filefile
- The temp File
java.io.IOException
- If File cannot be writtenpublic static java.io.File writeObjectToFile(java.lang.Object o, java.io.File file, boolean append) throws java.io.IOException
o
- Object to be written to filefile
- The temp Fileappend
- If true, append to this file instead of overwriting it
java.io.IOException
- If File cannot be writtenpublic static java.io.File writeObjectToFileNoExceptions(java.lang.Object o, java.lang.String filename)
o
- Object to be written to filefilename
- Name of the temp file
public static java.io.File writeObjectToTempFile(java.lang.Object o, java.lang.String filename) throws java.io.IOException
o
- Object to be written to filefilename
- Name of the temp file
java.io.IOException
- If file cannot be writtenpublic static java.io.File writeObjectToTempFileNoExceptions(java.lang.Object o, java.lang.String filename)
o
- Object to be written to filefilename
- Name of the temp file
public static void writeStringToFile(java.lang.String contents, java.lang.String path, java.lang.String encoding) throws java.io.IOException
contents
- The string to writepath
- The file pathencoding
- The encoding to encode in
java.io.IOException
- In case of failurepublic static void writeStringToFileNoExceptions(java.lang.String contents, java.lang.String path, java.lang.String encoding)
contents
- The string to writepath
- The file pathencoding
- The encoding to encode inpublic static java.io.File writeStringToTempFile(java.lang.String contents, java.lang.String path, java.lang.String encoding) throws java.io.IOException
contents
- The string to writepath
- The file pathencoding
- The encoding to encode in
java.io.IOException
- In case of failurepublic static void writeStringToTempFile(java.lang.String contents, java.lang.String path) throws java.io.IOException
contents
- The string to writepath
- The file path
java.io.IOException
- In case of failurepublic static java.io.File writeStringToTempFileNoExceptions(java.lang.String contents, java.lang.String path, java.lang.String encoding)
contents
- The string to writepath
- The file pathencoding
- The encoding to encode in
public static void writeStringToTempFileNoExceptions(java.lang.String contents, java.lang.String path)
contents
- The string to writepath
- The file pathpublic static <T> T readObjectFromFile(java.io.File file) throws java.io.IOException, java.lang.ClassNotFoundException
file
- The file pointing to the object to be retrieved
java.io.IOException
- If file cannot be read
java.lang.ClassNotFoundException
- If reading serialized object failspublic static <T> T readObjectFromURLOrClasspathOrFileSystem(java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException
filename
- The file pointing to the object to be retrieved
java.io.IOException
- If file cannot be read
java.lang.ClassNotFoundException
- If reading serialized object failspublic static <T> T readObjectFromObjectStream(java.io.ObjectInputStream ois) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static <T> T readObjectFromFile(java.lang.String filename) throws java.io.IOException, java.lang.ClassNotFoundException
filename
- The filename of the object to be retrieved
java.io.IOException
- If file cannot be read
java.lang.ClassNotFoundException
- If reading serialized object failspublic static <T> T readObjectFromFileNoExceptions(java.io.File file)
file
- The file pointing to the object to be retrieved
public static int lineCount(java.io.File textFile) throws java.io.IOException
java.io.IOException
public static java.io.ObjectOutputStream writeStreamFromString(java.lang.String serializePath) throws java.io.IOException
java.io.IOException
public static java.io.ObjectInputStream readStreamFromString(java.lang.String filenameOrUrl) throws java.io.IOException
java.io.IOException
public static java.io.InputStream getInputStreamFromURLOrClasspathOrFileSystem(java.lang.String textFileOrUrl) throws java.io.IOException
textFileOrUrl
-
java.io.IOException
public static java.io.BufferedReader readReaderFromString(java.lang.String textFileOrUrl) throws java.io.IOException
java.io.IOException
public static java.io.BufferedReader readReaderFromString(java.lang.String textFileOrUrl, java.lang.String encoding) throws java.io.IOException
textFileOrUrl
- What to read fromencoding
- CharSet encoding. Maybe be null, in which case the
platform default encoding is used
java.io.IOException
- If there is an I/O problempublic static java.lang.Iterable<java.lang.String> readLines(java.lang.String path)
path
- The file whose lines are to be read.
public static java.lang.Iterable<java.lang.String> readLines(java.io.File file)
file
- The file whose lines are to be read.
public static java.lang.Iterable<java.lang.String> readLines(java.io.File file, java.lang.Class<? extends java.io.InputStream> fileInputStreamWrapper)
file
- The file whose lines are to be read.fileInputStreamWrapper
- The class to wrap the InputStream with, e.g. GZIPInputStream. Note
that the class must have a constructor that accepts an
InputStream.
public static java.io.InputStream openFile(java.io.File file) throws RuntimeIOException
RuntimeIOException
public static void closeIgnoringExceptions(java.io.Closeable c)
c
- The IO resource to close (e.g., a Stream/Reader)public static java.lang.Iterable<java.io.File> iterFilesRecursive(java.io.File dir)
dir
- The root directory.
public static java.lang.Iterable<java.io.File> iterFilesRecursive(java.io.File dir, java.lang.String ext)
dir
- The root directory.ext
- A string that must be at the end of all files (e.g. ".txt")
public static java.lang.Iterable<java.io.File> iterFilesRecursive(java.io.File dir, java.util.regex.Pattern pattern)
dir
- The root directory.pattern
- A regular expression that the file path must match. This uses
Matcher.find(), so use ^ and $ to specify endpoints.
public static java.lang.String slurpFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpFile(java.io.File file, java.lang.String encoding) throws java.io.IOException
file
- The file to read fromencoding
- The character encoding to assume. This may be null, and
the platform default character encoding is used.
java.io.IOException
public static java.lang.String slurpGZippedFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpGZippedFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpGBFileNoExceptions(java.lang.String filename)
public static java.lang.String slurpFile(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpFileNoExceptions(java.lang.String filename, java.lang.String encoding)
null
.
public static java.lang.String slurpGBFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpGBURL(java.net.URL u) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpGBURLNoExceptions(java.net.URL u)
public static java.lang.String slurpURLNoExceptions(java.net.URL u, java.lang.String encoding)
public static java.lang.String slurpURL(java.net.URL u, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpURL(java.net.URL u) throws java.io.IOException
java.io.IOException
public static java.lang.String slurpURLNoExceptions(java.net.URL u)
public static java.lang.String slurpURL(java.lang.String path) throws java.lang.Exception
java.lang.Exception
public static java.lang.String slurpURLNoExceptions(java.lang.String path)
null
.
public static java.lang.String slurpFileNoExceptions(java.io.File file)
null
.public static java.lang.String slurpFileNoExceptions(java.lang.String filename)
null
.public static java.lang.String slurpReader(java.io.Reader reader)
public static void writeStreamToStream(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
input
- The input bytes.output
- Where the bytes should be written.
java.io.IOException
public static java.util.List<java.util.Map<java.lang.String,java.lang.String>> readCSVWithHeader(java.lang.String path, char quoteChar, char escapeChar) throws java.io.IOException
path
- - path to CSV filequoteChar
- - character for enclosing strings, defaults to "escapeChar
- - character for escaping quotes appearing in quoted strings; defaults to " (i.e. "" is used for " inside quotes, consistent with Excel)
java.io.IOException
public static java.util.List<java.util.Map<java.lang.String,java.lang.String>> readCSVWithHeader(java.lang.String path) throws java.io.IOException
java.io.IOException
public static java.util.LinkedList<java.lang.String[]> readCSVStrictly(char[] csvContents, int numColumns)
csvContents
- The char[] array corresponding to the contents of the filenumColumns
- The number of columns in the file (for verification, primarily)
public static java.util.LinkedList<java.lang.String[]> readCSVStrictly(java.lang.String filename, int numColumns) throws java.io.IOException
java.io.IOException
public static java.io.InputStream getFileInputStream(java.lang.String filename) throws java.io.IOException
filename
- Name of file to open
java.io.IOException
- if there are exceptions opening the filepublic static java.io.OutputStream getFileOutputStream(java.lang.String filename) throws java.io.IOException
filename
- Name of file to open
java.io.IOException
- if there are exceptions opening the filepublic static java.io.BufferedReader getBufferedFileReader(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.io.BufferedReader getBufferedFileReader(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.io.BufferedReader getBufferedReaderFromClasspathOrFileSystem(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.io.BufferedReader getBufferedReaderFromClasspathOrFileSystem(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.io.PrintWriter getPrintWriter(java.io.File textFile) throws java.io.IOException
java.io.IOException
public static java.io.PrintWriter getPrintWriter(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.io.PrintWriter getPrintWriterIgnoringExceptions(java.lang.String filename)
public static java.io.PrintWriter getPrintWriterOrDie(java.lang.String filename)
public static java.io.PrintWriter getPrintWriter(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public static java.io.InputStream getBZip2PipedInputStream(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.io.OutputStream getBZip2PipedOutputStream(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.util.Set<java.lang.String> readColumnSet(java.lang.String infile, int field) throws java.io.IOException
infile
- - filenamefield
- index of field to read
java.io.IOException
public static <C> java.util.List<C> readObjectFromColumns(java.lang.Class objClass, java.lang.String filename, java.lang.String[] fieldNames, java.lang.String delimiter) throws java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchFieldException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
public static java.util.Map<java.lang.String,java.lang.String> readMap(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.lang.String stringFromFile(java.lang.String filename)
public static java.lang.String stringFromFile(java.lang.String filename, java.lang.String encoding)
public static java.util.List<java.lang.String> linesFromFile(java.lang.String filename)
public static java.util.List<java.lang.String> linesFromFile(java.lang.String filename, java.lang.String encoding)
public static java.lang.String backupName(java.lang.String filename)
public static java.io.File backupFile(java.io.File file)
public static boolean renameToBackupName(java.io.File file)
public static java.io.File getJNLPLocalScratch()
public static java.io.File ensureDir(java.io.File tgtDir) throws java.io.IOException
tgtDir
- The directory that you wish to ensure exists
java.io.IOException
- If directory can't be created, is an existing file, or for other reasonspublic static void main(java.lang.String[] args)
public static java.lang.String getExtension(java.lang.String fileName)
public static java.io.Reader encodedInputStreamReader(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
stream
- An InputStreamencoding
- A charset encoding
java.io.IOException
- If any IO problempublic static java.io.Writer encodedOutputStreamWriter(java.io.OutputStream stream, java.lang.String encoding) throws java.io.IOException
stream
- An InputStreamencoding
- A charset encoding
java.io.IOException
- If any IO problempublic static java.io.PrintWriter encodedOutputStreamPrintWriter(java.io.OutputStream stream, java.lang.String encoding, boolean autoFlush) throws java.io.IOException
stream
- An InputStreamencoding
- A charset encodingautoFlush
- Whether to make an autoflushing Writer
java.io.IOException
- If any IO problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |