public class ScanResult extends Object
Encapsulates the result of scanning based on a ScanRequest
. The
scan results are available in a structure corresponding to the Java class
hierarchy; i.e.:
package |_class |_field |_method | |_method parameter |_constructor |_constructor parameter
The tree of results can be iterated in this manner using
getPackages()
. However, if a given Weaver
is known not to
handle packages but some other element, convenience methods are provided
here giving direct access to the various elements that may have been
discovered.
Constructor and Description |
---|
ScanResult() |
public WeavablePackage getWeavable(Package pkg)
WeaveProcessor
.pkg
- to wrapWeavablePackage
public <T> WeavableClass<T> getWeavable(Class<T> cls)
WeaveProcessor
.T
- typecls
- to wrapWeavableClass
public WeavableField<?> getWeavable(Field fld)
WeaveProcessor
.fld
- to wrapWeavableField
public WeavableMethod<?> getWeavable(Method methd)
WeaveProcessor
.methd
- to wrapWeavableMethod
public <T> WeavableConstructor<T> getWeavable(Constructor<T> ctor)
WeaveProcessor
.T
- typector
- to wrapWeavableConstructor
public AnnotatedElements<WeavablePackage> getPackages()
WeavablePackage
s.AnnotatedElements
public AnnotatedElements<WeavableClass<?>> getClasses()
WeavableClass
es.AnnotatedElements
public AnnotatedElements<WeavableClass<?>> getClassesAssignableTo(Class<?> supertype)
WeavableClass
es assignable to supertype
.supertype
- Class
whose subtypes are soughtAnnotatedElements
public AnnotatedElements<WeavableField<?>> getFields()
WeavableField
s.AnnotatedElements
public AnnotatedElements<WeavableConstructor<?>> getConstructors()
WeavableConstructor
s.AnnotatedElements
public AnnotatedElements<WeavableMethod<?>> getMethods()
WeavableMethod
s.AnnotatedElements
public AnnotatedElements<WeavableMethodParameter<?>> getMethodParameters()
WeavableMethodParameter
s.AnnotatedElements
public AnnotatedElements<WeavableConstructorParameter<?>> getConstructorParameters()
WeavableConstructorParameter
s.AnnotatedElements
Copyright © 2018 The Apache Software Foundation. All rights reserved.