## org.eclipse.jet.core.parser.ast
Class JETASTParser.Builder

    java.lang.Object
      org.eclipse.jet.core.parser.ast.JETASTParser.Builder

Enclosing class:
  JETASTParser

    public static final class JETASTParser.Builder

extends java.lang.Object

Builder for JETAST Parser

Constructor Summary
`JETASTParser.Builder(int jetSpec)` Create a JETASTParser builder for a parser using the specified JET language specification

Method Summary
`JETASTParser` `build()` Build the JETASTParser
`JETASTParser.Builder` `enableEmbeddedExpressions(boolean enableEmbeddedExpressions)`
`JETASTParser.Builder` `predefinedTagLibraries(java.util.Map predefinedTagLibraries)` Specify a map of predefined JET tag library prefixes to their corresponding JET tag libary ids.
`JETASTParser.Builder` `tagLibraryResolver(ITagLibraryResolver tagLibraryResolver)` Specify a tag library resolver for the parser
`JETASTParser.Builder` `templateResolver(ITemplateResolver templateResolver)` Specify a template resolver for the parser.

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

Constructor Detail

### JETASTParser.Builder

    public JETASTParser.Builder(int jetSpec)

  Create a JETASTParser builder for a parser using the specified JET language specification

  Parameters:
    `jetSpec` - either `JETAST.JET_SPEC_V1` or `JETAST.JET_SPEC_V2`.
  Throws:
    `java.lang.IllegalArgumentException` - if `jetSpec` is not one of the specified values.

Method Detail

### templateResolver

    public JETASTParser.Builder templateResolver(ITemplateResolver templateResolver)

  Specify a template resolver for the parser. If not specified, then not template paths are resolvable, and all templatePath references in parser APIs or in JET directives will result in compilation errors.

  Parameters:
    `templateResolver` - a templateResolver. Cannot be `null`
  Returns:
    the builder
  Throws:
    `java.lang.NullPointerException` - if `templateResolver` is `null`

### predefinedTagLibraries

    public JETASTParser.Builder predefinedTagLibraries(java.util.Map predefinedTagLibraries)

  Specify a map of predefined JET tag library prefixes to their corresponding JET tag libary ids. If not specified, then not tag libraries are predefined.

  Parameters:
    `predefinedTagLibraries` - a non-null map of predefined JET tag libraries.
  Returns:
    the builder.
  Throws:
    `java.lang.NullPointerException` - if `predefinedTagLibraries` is `null`

### tagLibraryResolver

    public JETASTParser.Builder tagLibraryResolver(ITagLibraryResolver tagLibraryResolver)

  Specify a tag library resolver for the parser

  Parameters:
    `tagLibraryResolver` - a tag library resolver instance
  Returns:
    the tag builder

### enableEmbeddedExpressions

    public JETASTParser.Builder enableEmbeddedExpressions(boolean enableEmbeddedExpressions)

### build

    public JETASTParser build()

  Build the JETASTParser

  Returns:
    the new parser.

Copyright 2006 IBM Corporation and others. All Rights Reserved.