public class AnnotationParser extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationParser.AbstractHandler
AbstractHandler
Convenience base class to provide no-ops for all Handler methods.
|
class |
AnnotationParser.ClassInfo
ClassInfo
Immutable information gathered by parsing class header.
|
class |
AnnotationParser.FieldInfo
FieldInfo
Immutable information gathered by parsing a field on a class.
|
static interface |
AnnotationParser.Handler
Handler
Signature for all handlers that respond to parsing class files.
|
class |
AnnotationParser.MethodInfo
MethodInfo
Immutable information gathered by parsing a method on a class.
|
class |
AnnotationParser.MyClassVisitor
MyClassVisitor
ASM visitor for a class.
|
class |
AnnotationParser.MyFieldVisitor
MyFieldVisitor
An ASM visitor for parsing Fields.
|
class |
AnnotationParser.MyMethodVisitor
MyMethodVisitor
ASM Visitor for parsing a method.
|
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
_parsedClassNames |
protected static int |
ASM_OPCODE_VERSION |
Constructor and Description |
---|
AnnotationParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
isParsed(String className)
True if the class has already been processed, false otherwise
|
static String |
normalize(String name)
Convert internal name to simple name
|
static String[] |
normalize(String[] list)
Convert internal names to simple names.
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
Class<?> clazz,
ClassNameResolver resolver,
boolean visitSuperClasses)
Parse the given class, optionally walking its inheritance hierarchy
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
ClassLoader loader,
boolean visitParents,
boolean nullInclusive,
ClassNameResolver resolver)
Parse classes in the supplied classloader.
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
List<String> classNames,
ClassNameResolver resolver)
Parse the given classes
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
Resource r,
ClassNameResolver resolver)
Parse a resource
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
String[] classNames,
ClassNameResolver resolver)
Parse the given classes
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
String className,
ClassNameResolver resolver)
Parse a given class
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
URI[] uris,
ClassNameResolver resolver)
Parse classes in the supplied uris.
|
void |
parse(Set<? extends AnnotationParser.Handler> handlers,
URI uri,
ClassNameResolver resolver)
Parse a particular uri
|
protected void |
parseDir(Set<? extends AnnotationParser.Handler> handlers,
Resource dir,
ClassNameResolver resolver)
Parse all classes in a directory
|
protected void |
parseJar(Set<? extends AnnotationParser.Handler> handlers,
Resource jarResource,
ClassNameResolver resolver)
Parse a resource that is a jar file.
|
protected void |
parseJarEntry(Set<? extends AnnotationParser.Handler> handlers,
Resource jar,
JarEntry entry,
ClassNameResolver resolver)
Parse a single entry in a jar file
|
protected void |
scanClass(Set<? extends AnnotationParser.Handler> handlers,
Resource containingResource,
InputStream is)
Use ASM on a class
|
public static String normalize(String name)
name
- public static String[] normalize(String[] list)
list
- public boolean isParsed(String className)
className
- public void parse(Set<? extends AnnotationParser.Handler> handlers, String className, ClassNameResolver resolver) throws Exception
className
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, Class<?> clazz, ClassNameResolver resolver, boolean visitSuperClasses) throws Exception
clazz
- resolver
- visitSuperClasses
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, String[] classNames, ClassNameResolver resolver) throws Exception
classNames
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, List<String> classNames, ClassNameResolver resolver) throws Exception
classNames
- resolver
- Exception
protected void parseDir(Set<? extends AnnotationParser.Handler> handlers, Resource dir, ClassNameResolver resolver) throws Exception
dir
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, ClassLoader loader, boolean visitParents, boolean nullInclusive, ClassNameResolver resolver) throws Exception
loader
- visitParents
- nullInclusive
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, URI[] uris, ClassNameResolver resolver) throws Exception
uris
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, URI uri, ClassNameResolver resolver) throws Exception
uri
- resolver
- Exception
public void parse(Set<? extends AnnotationParser.Handler> handlers, Resource r, ClassNameResolver resolver) throws Exception
r
- resolver
- Exception
protected void parseJar(Set<? extends AnnotationParser.Handler> handlers, Resource jarResource, ClassNameResolver resolver) throws Exception
jarResource
- resolver
- Exception
protected void parseJarEntry(Set<? extends AnnotationParser.Handler> handlers, Resource jar, JarEntry entry, ClassNameResolver resolver) throws Exception
jar
- entry
- resolver
- Exception
protected void scanClass(Set<? extends AnnotationParser.Handler> handlers, Resource containingResource, InputStream is) throws IOException
containingResource
- the dir or jar that the class is contained within, can be null if not knownis
- IOException
Copyright © 1995-2015 Webtide. All Rights Reserved.