Methods Summary |
---|
public static java.util.List | constructorsIn(java.lang.Iterable elements)Returns a list of constructors in {@code elements}.
return listFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class);
|
public static java.util.Set | constructorsIn(java.util.Set elements)Returns a set of constructors in {@code elements}.
return setFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class);
|
public static java.util.List | fieldsIn(java.lang.Iterable elements)Returns a list of fields in {@code elements}.
return listFilter(elements, FIELD_KINDS, VariableElement.class);
|
public static java.util.Set | fieldsIn(java.util.Set elements)Returns a set of fields in {@code elements}.
return setFilter(elements, FIELD_KINDS, VariableElement.class);
|
private static java.util.List | listFilter(java.lang.Iterable elements, java.util.Set targetKinds, java.lang.Class clazz)
List<E> list = new ArrayList<E>();
for (Element e : elements) {
if (targetKinds.contains(e.getKind()))
list.add(clazz.cast(e));
}
return list;
|
public static java.util.List | methodsIn(java.lang.Iterable elements)Returns a list of methods in {@code elements}.
return listFilter(elements, METHOD_KIND, ExecutableElement.class);
|
public static java.util.Set | methodsIn(java.util.Set elements)Returns a set of methods in {@code elements}.
return setFilter(elements, METHOD_KIND, ExecutableElement.class);
|
public static java.util.List | packagesIn(java.lang.Iterable elements)Returns a list of packages in {@code elements}.
return listFilter(elements, PACKAGE_KIND, PackageElement.class);
|
public static java.util.Set | packagesIn(java.util.Set elements)Returns a set of packages in {@code elements}.
return setFilter(elements, PACKAGE_KIND, PackageElement.class);
|
private static java.util.Set | setFilter(java.util.Set elements, java.util.Set targetKinds, java.lang.Class clazz)
// Return set preserving iteration order of input set.
Set<E> set = new LinkedHashSet<E>();
for (Element e : elements) {
if (targetKinds.contains(e.getKind()))
set.add(clazz.cast(e));
}
return set;
|
public static java.util.List | typesIn(java.lang.Iterable elements)Returns a list of types in {@code elements}.
return listFilter(elements, TYPE_KINDS, TypeElement.class);
|
public static java.util.Set | typesIn(java.util.Set elements)Returns a set of types in {@code elements}.
return setFilter(elements, TYPE_KINDS, TypeElement.class);
|