net.sf.retrotranslator.runtime.impl
Class AnnotatedElementDescriptor
java.lang.Object
net.sf.retrotranslator.runtime.impl.EmptyVisitor
net.sf.retrotranslator.runtime.impl.AnnotatedElementDescriptor
- All Implemented Interfaces:
- AnnotationVisitor, ClassVisitor, FieldVisitor, MethodVisitor, SignatureVisitor
- Direct Known Subclasses:
- FieldDescriptor, GenericDeclarationDescriptor
public abstract class AnnotatedElementDescriptor
- extends EmptyVisitor
- Author:
- Taras Puchko
Methods inherited from class net.sf.retrotranslator.runtime.impl.EmptyVisitor |
visit, visit, visitAnnotation, visitAnnotationDefault, visitArray, visitArrayType, visitAttribute, visitBaseType, visitClassBound, visitClassType, visitCode, visitEnd, visitEnum, visitExceptionType, visitField, visitFieldInsn, visitFormalTypeParameter, visitIincInsn, visitInnerClass, visitInnerClassType, visitInsn, visitInterface, visitInterfaceBound, visitIntInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLookupSwitchInsn, visitMaxs, visitMethod, visitMethodInsn, visitMultiANewArrayInsn, visitOuterClass, visitParameterAnnotation, visitParameterType, visitReturnType, visitSource, visitSuperclass, visitTableSwitchInsn, visitTryCatchBlock, visitTypeArgument, visitTypeArgument, visitTypeInsn, visitTypeVariable, visitVarInsn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
private static final Annotation_[] EMPTY
EMPTY_VISITOR
protected static final EmptyVisitor EMPTY_VISITOR
access
protected int access
declaredAnnotations
private LazyList<AnnotationValue,Annotation_> declaredAnnotations
annotations
private LazyValue<LazyList<AnnotationValue,Annotation_>,Annotation_[]> annotations
AnnotatedElementDescriptor
public AnnotatedElementDescriptor()
isAccess
public boolean isAccess(int mask)
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class annotationType)
getAnnotation
public Annotation_ getAnnotation(java.lang.Class annotationType)
getAnnotations
public Annotation_[] getAnnotations()
getDeclaredAnnotations
public Annotation_[] getDeclaredAnnotations()
getClassDescriptor
public abstract ClassDescriptor getClassDescriptor()
findTypeVariable
protected abstract java.lang.reflect.TypeVariable findTypeVariable(java.lang.String name)
createAnnotations
protected abstract Annotation_[] createAnnotations(Annotation_[] declaredAnnotations)
createAnnotations
protected Annotation_[] createAnnotations(java.util.List<AnnotationValue> values)
visitAnnotation
public AnnotationVisitor visitAnnotation(java.lang.String desc,
boolean visible)
- Description copied from interface:
ClassVisitor
- Visits an annotation of the class.
- Specified by:
visitAnnotation
in interface ClassVisitor
- Specified by:
visitAnnotation
in interface FieldVisitor
- Specified by:
visitAnnotation
in interface MethodVisitor
- Overrides:
visitAnnotation
in class EmptyVisitor
- Parameters:
desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.
- Returns:
- a non null visitor to visit the annotation values.
getClassLoader
private java.lang.ClassLoader getClassLoader()
getClassByInternalName
protected java.lang.Class getClassByInternalName(java.lang.String name)
getClassByType
protected java.lang.Class getClassByType(Type type)
getClassByDesc
private java.lang.Class getClassByDesc(java.lang.String desc)
createTypes
public java.lang.reflect.Type[] createTypes(java.util.List<TypeDescriptor> descriptors)
createType
public java.lang.reflect.Type createType(TypeDescriptor descriptor)
createClassType
private java.lang.reflect.Type createClassType(ClassTypeElement[] typeElements)
createArguments
private java.lang.reflect.Type[] createArguments(java.util.List<TypeArgument> arguments)
createAnnotation
private Annotation_ createAnnotation(AnnotationValue annotationValue)
getProxyClassLoader
private java.lang.ClassLoader getProxyClassLoader(java.lang.Class annotationType)
resolveValue
protected java.lang.Object resolveValue(java.lang.Object value,
java.lang.Class type,
MethodDescriptor descriptor)
getEnumValue
private java.lang.Object getEnumValue(java.lang.Class enumType,
java.lang.String name)
append
private static void append(java.lang.StringBuffer buffer,
java.lang.Object value)
getLazyType
protected LazyValue<TypeDescriptor,java.lang.reflect.Type> getLazyType(TypeDescriptor descriptor)
getLazyList
protected LazyList<TypeDescriptor,java.lang.reflect.Type> getLazyList()