## org.eclipse.jet
Class ContextLogEntry.Builder

    java.lang.Object
      org.eclipse.jet.ContextLogEntry.Builder

Enclosing class:
  ContextLogEntry

    public static final class ContextLogEntry.Builder

extends java.lang.Object

Builder for `ContextLogEntry` entities

Constructor Summary
`ContextLogEntry.Builder(ContextLogEntry[] children)` Create a ContextLogEntry Builder that summarizes a collection of other ContextLog Entries.
`ContextLogEntry.Builder(int severity)` Create a ContextLogEntry Builder for a single entry with the indicated severity

Method Summary
`ContextLogEntry` `build()` Construct the ContextLogEntry based on information provided in the builder.
`ContextLogEntry.Builder` `exception(java.lang.Throwable exception)` Specify an exception for the ContextLogEntry.
`int` `getSeverity()` Returnt the severity for the log entry
`ContextLogEntry.Builder` `location(int line, int col)` Specify the template line and column for the entry.
`ContextLogEntry.Builder` `message(java.lang.String message)` Specify an option message for the ContextLogEntry.
`ContextLogEntry.Builder` `tagInfo(TagInfo tagInfo)` Specify the JET tag information for this entry.
`ContextLogEntry.Builder` `templatePath(java.lang.String templatePath)` Specify the template path where the entry originates Note that this replaces any previously specified templatePath for the entry

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContextLogEntry.Builder

    public ContextLogEntry.Builder(ContextLogEntry[] children)

  Create a ContextLogEntry Builder that summarizes a collection of other ContextLog Entries.

  Parameters:
    `children` - a non-null list of ContextLogEntries
  Throws:
    `java.lang.NullPointerException` - if children is `null` or an array entry is `null`

### ContextLogEntry.Builder

    public ContextLogEntry.Builder(int severity)

  Create a ContextLogEntry Builder for a single entry with the indicated severity

  Parameters:
    `severity` - one of `ContextLogEntry.OK`, `ContextLogEntry.INFO`, `ContextLogEntry.WARNING`, `ContextLogEntry.ERROR` or `ContextLogEntry.CANCEL`
  Throws:
    `java.lang.IllegalArgumentException` - if severity is not a valid value

Method Detail

### message

    public ContextLogEntry.Builder message(java.lang.String message)

  Specify an option message for the ContextLogEntry. Note that this replaces any previously specified or calculated message for the entry

  Parameters:
    `message` - a message, possibly `null`
  Returns:
    this builder

### exception

    public ContextLogEntry.Builder exception(java.lang.Throwable exception)

  Specify an exception for the ContextLogEntry. Note that this replaces any previously specified exception for the entry

  Parameters:
    `exception` - an exception, possibly `null`
  Returns:
    this builder

### templatePath

    public ContextLogEntry.Builder templatePath(java.lang.String templatePath)

  Specify the template path where the entry originates Note that this replaces any previously specified templatePath for the entry

  Parameters:
    `templatePath` - a template path
  Returns:
    this builder

### location

    public ContextLogEntry.Builder location(int line,
                                            int col)

  Specify the template line and column for the entry. Note that this replaces any previously specified line and column for the entry

  Parameters:
    `line` - the line
    `col` - the column
  Returns:
    this builder

### tagInfo

    public ContextLogEntry.Builder tagInfo(TagInfo tagInfo)

  Specify the JET tag information for this entry. Note that seting tag information will replace any previously specified location information.

  Parameters:
    `tagInfo` - a tag information object
  Returns:
    this builder
  Throws:
    `java.lang.NullPointerException` - if tagInfo is null

### build

    public ContextLogEntry build()

  Construct the ContextLogEntry based on information provided in the builder.

  Returns:
    the contenxt log entry

### getSeverity

    public int getSeverity()

  Returnt the severity for the log entry

  Returns:
    one of `ContextLogEntry.OK`, `ContextLogEntry.INFO`, `ContextLogEntry.WARNING`, `ContextLogEntry.ERROR`, `ContextLogEntry.CANCEL`.

Copyright 2006 IBM Corporation and others. All Rights Reserved.