Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.jdeveloper.java.util
Class SourceElementAsList

java.lang.Object
  extended by oracle.jdeveloper.java.util.SourceElementAsList

public final class SourceElementAsList
extends java.lang.Object

This class converts a SourceElement tree into a flat List. The different methods allow different forms of filtering. The most important methods here are probably asList(oracle.javatools.parser.java.v2.model.SourceElement) and asList(oracle.javatools.parser.java.v2.model.SourceElement, int)


Method Summary
static java.util.List<SourceElement> asList(SourceElement root)
           
static java.util.List<SourceElement> asList(SourceElement root, java.lang.Class elementClass)
           
static java.util.List<SourceElement> asList(SourceElement root, int symbolKind)
           
static java.util.List<SourceElement> asList(SourceElement root, int[] symbolKinds)
           
static java.util.List<SourceElement> filterByClass(java.util.List<SourceElement> list, java.lang.Class elementClass)
           
static java.util.List<SourceElement> filterBySymbolKind(java.util.List<SourceElement> list, int symbolKind)
           
static java.util.List<SourceElement> filterNamedElements(java.util.List<SourceElement> list, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

asList

public static java.util.List<SourceElement> asList(SourceElement root)
Returns:
a List of all the SourceElements contained and including in that root

asList

public static java.util.List<SourceElement> asList(SourceElement root,
                                                   java.lang.Class elementClass)
Returns:
a List of all the SourceElements of the specified class.

asList

public static java.util.List<SourceElement> asList(SourceElement root,
                                                   int symbolKind)
Returns:
a List of all the SourceElements of the specified type.

asList

public static java.util.List<SourceElement> asList(SourceElement root,
                                                   int[] symbolKinds)
Returns:
a List of all the SourceElements of the specified types.

filterNamedElements

public static java.util.List<SourceElement> filterNamedElements(java.util.List<SourceElement> list,
                                                                java.lang.String name)
Parameters:
list - a List of SourceElement
name -
Returns:
a sub-list of list that only contains SourceHasName elements named name

filterByClass

public static java.util.List<SourceElement> filterByClass(java.util.List<SourceElement> list,
                                                          java.lang.Class elementClass)
Parameters:
list - a List of SourceElement
Returns:
a sub-list of list that only contains elements of Class elementClass

filterBySymbolKind

public static java.util.List<SourceElement> filterBySymbolKind(java.util.List<SourceElement> list,
                                                               int symbolKind)
Parameters:
list - a List of SourceElement
Returns:
a sub-list of list that only contains elements of Class elementClass

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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