Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

javax.ide.extension
Interface ElementVisitorFactory2

All Superinterfaces:
ElementVisitorFactory

public interface ElementVisitorFactory2
extends ElementVisitorFactory

New version of ElementVisitorFactory. This new implementation has an overloaded version of getElementVisitor() that takes an ElementContext corresponding to the parent element.

If an ElementVisitorFactory is registered with ElementContext#registerVisitorFactory(ElementVisitorFactory) and also implements ElementVisitorFactory2, then the getVisitor(ElementContext,ElementName) will be used in preference to ElementVisitorFactory.getVisitor(ElementName).

Since:
2.0

Method Summary
 ElementVisitor getVisitor(ElementContext context, ElementName name)
          Get a suitable visitor for the specified element name.
 boolean isDescending()
          Returns true if this visitor factory supports descending through all children of the element for which it was registered.
 
Methods inherited from interface javax.ide.extension.ElementVisitorFactory
getVisitor
 

Method Detail

isDescending

boolean isDescending()
Returns true if this visitor factory supports descending through all children of the element for which it was registered. The default behavior for all ElementVisitorFactory instances in JSR-198 was to descend. For backwards compatibility, any ElementVisitorFactory that is not an ElementVisitorFactory2 behaves as if this method returns true.

Returns:
true if this factory should be used to handle all elements in the scope of the element it was registered for.

getVisitor

ElementVisitor getVisitor(ElementContext context,
                          ElementName name)
                          throws UnrecognizedElementException
Get a suitable visitor for the specified element name.

Parameters:
context - the current context.
name - a qualified element name.
Returns:
a visitor suitable for this element, or null.
Throws:
UnrecognizedElementException - if the factory does not recognize the element and this should be raised as an error.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.