public final class ExpressionConverter extends Object
IConfigurationElement
or Element
(DOM) subtree into a
corresponding expression tree.
An expression converter manages a list of ElementHandler
s. Element
handlers are responsible to do the actual conversion. The element handlers
build a chain of responsibility.
Constructor and Description |
---|
ExpressionConverter(ElementHandler[] handlers)
Creates a new expression converter with the given list of element
handlers.
|
Modifier and Type | Method and Description |
---|---|
static ExpressionConverter |
getDefault()
Returns the default expression converter.
|
Expression |
perform(Element root)
Converts the tree of DOM elements represented by the given
root element and returns a corresponding expression tree.
|
Expression |
perform(IConfigurationElement root)
Converts the tree of configuration elements represented by the given
root element and returns a corresponding expression tree.
|
public ExpressionConverter(ElementHandler[] handlers)
handlers
- the array of element handlerspublic static ExpressionConverter getDefault()
public Expression perform(IConfigurationElement root) throws CoreException
root
- the configuration element to be convertednull
if the configuration element cannot be convertedCoreException
- if the configuration element can't be
converted. Reasons include: (a) no handler is available to
cope with a certain configuration element or (b) the XML
expression tree is malformed.public Expression perform(Element root) throws CoreException
root
- the element to be convertednull
if the element cannot be convertedCoreException
- if the element can't be converted.
Reasons include: (a) no handler is available to cope with
a certain element or (b) the XML expression tree is malformed.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.