Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.expressions
Class ExpressionConverter


java.lang.Object
  extended by 
org.eclipse.core.expressions.ExpressionConverter

public final class ExpressionConverter
extends Object

An expression converter converts an XML expression represented by an IConfigurationElement or Element (DOM) subtree into a corresponding expression tree.

An expression converter manages a list of ElementHandlers. Element handlers are responsible to do the actual conversion. The element handlers build a chain of responsibility.

Since:
3.0

Constructor Summary
ExpressionConverter ( ElementHandler[] handlers)
          Creates a new expression converter with the given list of element handlers.
 
Method Summary
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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionConverter

public ExpressionConverter(
ElementHandler[] handlers)
Creates a new expression converter with the given list of element handlers. The element handlers build a chain of responsibility meaning that the first handler in the list is first used to convert the configuration element. If this handler isn't able to convert the configuration element the next handler in the array is used.

Parameters:
handlers - the array of element handlers
Method Detail

getDefault

public static 
ExpressionConverter getDefault()
Returns the default expression converter. The default expression converter can cope with all expression elements defined by the common expression language.

Returns:
the default expression converter

perform

public 
Expression perform(
IConfigurationElement root)
                   throws 
CoreException
Converts the tree of configuration elements represented by the given root element and returns a corresponding expression tree.

Parameters:
root - the configuration element to be converted
Returns:
the corresponding expression tree or null if the configuration element cannot be converted
Throws:
CoreException - 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.

perform

public 
Expression perform(
Element root)
                   throws 
CoreException
Converts the tree of DOM elements represented by the given root element and returns a corresponding expression tree.

Parameters:
root - the element to be converted
Returns:
the corresponding expression tree or null if the element cannot be converted
Throws:
CoreException - 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.
Since:
3.3

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire