net.sourceforge.retroweaver.runtime.java.lang.reflect
Class ReflectionDescriptor

java.lang.Object
  extended by net.sourceforge.retroweaver.runtime.java.lang.reflect.ReflectionDescriptor

public class ReflectionDescriptor
extends java.lang.Object


Nested Class Summary
static class ReflectionDescriptor.ClassTypeImpl
           
static class ReflectionDescriptor.GenericArrayTypeImpl
           
static class ReflectionDescriptor.ParameterizedTypeImpl
           
static class ReflectionDescriptor.TypeVariableImpl<D extends GenericDeclaration>
           
static class ReflectionDescriptor.WildcardTypeImpl
           
 
Constructor Summary
protected ReflectionDescriptor(java.lang.String name, java.io.InputStream classStream)
           
 
Method Summary
 void debugMessage(java.lang.String msg)
           
 java.lang.Class getEnclosingClass()
           
 java.lang.String getEnclosingClassName()
           
 java.lang.reflect.Constructor getEnclosingConstructor()
           
 java.lang.reflect.Method getEnclosingMethod()
           
 Type[] getGenericInterfaces()
           
 Type getGenericSuperclass()
           
static ReflectionDescriptor getReflectionDescriptor(java.lang.Class class_)
           
 TypeVariable[] getTypeParameters()
           
static void main(java.lang.String[] args)
           
 boolean testConstructorAccess(java.lang.reflect.Constructor c, int mask)
           
 boolean testFieldAccess(java.lang.reflect.Field f, int mask)
           
 boolean testMethodAccess(java.lang.reflect.Method m, int mask)
           
 void visit(int version, int access, java.lang.String name, java.lang.String signature, java.lang.String superName, java.lang.String[] interfaces)
          Visits the header of the class.
 AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
           
 void visitAttribute(Attribute attr)
           
 void visitEnd()
           
 FieldVisitor visitField(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.Object value)
           
 void visitInnerClass(java.lang.String name, java.lang.String outerName, java.lang.String innerName, int access)
          Visits information about an inner class.
 MethodVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.String[] exceptions)
           
 void visitOuterClass(java.lang.String owner, java.lang.String name, java.lang.String desc)
          Visits the enclosing class of the class.
 void visitSource(java.lang.String source, java.lang.String debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionDescriptor

protected ReflectionDescriptor(java.lang.String name,
                               java.io.InputStream classStream)
Method Detail

getReflectionDescriptor

public static ReflectionDescriptor getReflectionDescriptor(java.lang.Class class_)

getEnclosingClassName

public java.lang.String getEnclosingClassName()

debugMessage

public void debugMessage(java.lang.String msg)

getEnclosingClass

public java.lang.Class getEnclosingClass()

getEnclosingMethod

public java.lang.reflect.Method getEnclosingMethod()

getEnclosingConstructor

public java.lang.reflect.Constructor getEnclosingConstructor()

testFieldAccess

public boolean testFieldAccess(java.lang.reflect.Field f,
                               int mask)

testMethodAccess

public boolean testMethodAccess(java.lang.reflect.Method m,
                                int mask)

testConstructorAccess

public boolean testConstructorAccess(java.lang.reflect.Constructor c,
                                     int mask)

getTypeParameters

public TypeVariable[] getTypeParameters()
                                 throws GenericSignatureFormatError
Throws:
GenericSignatureFormatError

getGenericSuperclass

public Type getGenericSuperclass()
                          throws GenericSignatureFormatError,
                                 TypeNotPresentException,
                                 MalformedParameterizedTypeException
Throws:
GenericSignatureFormatError
TypeNotPresentException
MalformedParameterizedTypeException

getGenericInterfaces

public Type[] getGenericInterfaces()
                            throws GenericSignatureFormatError,
                                   TypeNotPresentException,
                                   MalformedParameterizedTypeException
Throws:
GenericSignatureFormatError
TypeNotPresentException
MalformedParameterizedTypeException

visit

public void visit(int version,
                  int access,
                  java.lang.String name,
                  java.lang.String signature,
                  java.lang.String superName,
                  java.lang.String[] interfaces)
Visits the header of the class.

Parameters:
version - the class version.
access - the class's access flags (see Opcodes). This parameter also indicates if the class is deprecated.
name - the internal name of the class (see getInternalName).
signature - the signature of this class. May be null if the class is not a generic one, and does not extend or implement generic classes or interfaces.
superName - the internal of name of the super class (see getInternalName). For interfaces, the super class is Object. May be null, but only for the Object class.
interfaces - the internal names of the class's interfaces (see getInternalName). May be null.

visitSource

public void visitSource(java.lang.String source,
                        java.lang.String debug)

visitOuterClass

public void visitOuterClass(java.lang.String owner,
                            java.lang.String name,
                            java.lang.String desc)
Visits the enclosing class of the class. This method must be called only if the class has an enclosing class.

Parameters:
owner - internal name of the enclosing class of the class.
name - the name of the method that contains the class, or null if the class is not enclosed in a method of its enclosing class.
desc - the descriptor of the method that contains the class, or null if the class is not enclosed in a method of its enclosing class.

visitInnerClass

public void visitInnerClass(java.lang.String name,
                            java.lang.String outerName,
                            java.lang.String innerName,
                            int access)
Visits information about an inner class. This inner class is not necessarily a member of the class being visited.

Parameters:
name - the internal name of an inner class (see getInternalName).
outerName - the internal name of the class to which the inner class belongs (see getInternalName). May be null.
innerName - the (simple) name of the inner class inside its enclosing class. May be null for anonymous inner classes.
access - the access flags of the inner class as originally declared in the enclosing class.

visitAnnotation

public AnnotationVisitor visitAnnotation(java.lang.String desc,
                                         boolean visible)

visitAttribute

public void visitAttribute(Attribute attr)

visitField

public FieldVisitor visitField(int access,
                               java.lang.String name,
                               java.lang.String desc,
                               java.lang.String signature,
                               java.lang.Object value)

visitMethod

public MethodVisitor visitMethod(int access,
                                 java.lang.String name,
                                 java.lang.String desc,
                                 java.lang.String signature,
                                 java.lang.String[] exceptions)

visitEnd

public void visitEnd()

main

public static void main(java.lang.String[] args)