JBoss Reflection 2.2.1.SP1

org.jboss.reflect.plugins.bytecode
Class BytecodeGenericsHelper

java.lang.Object
  extended by org.jboss.reflect.plugins.bytecode.BytecodeGenericsHelper

public class BytecodeGenericsHelper
extends Object

Utilities to figure out generic information

Version:
$Revision: 1.1 $
Author:
Kabir Khan

Constructor Summary
BytecodeGenericsHelper()
           
 
Method Summary
static TypeInfo[] createParameterTypes(javassist.bytecode.SignatureAttribute.MethodSignature sig, org.jboss.reflect.plugins.bytecode.BytecodeClassInfo typeInfo)
          Creates the generic parameter types for a constructor or method
static boolean determineHierarchy(Stack<ClassInfo> hierarchy, ClassInfo current, ClassInfo search)
          Figures out the path between the passed in classes
static javassist.bytecode.SignatureAttribute.MethodSignature getMethodSignature(javassist.CtBehavior behaviour)
          Gets the MethodSignature for a method/constructor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytecodeGenericsHelper

public BytecodeGenericsHelper()
Method Detail

createParameterTypes

public static TypeInfo[] createParameterTypes(javassist.bytecode.SignatureAttribute.MethodSignature sig,
                                              org.jboss.reflect.plugins.bytecode.BytecodeClassInfo typeInfo)
Creates the generic parameter types for a constructor or method

Parameters:
sig - the method/constructor signature
typeInfo - the javassist type info
Returns:
the parameter types

getMethodSignature

public static javassist.bytecode.SignatureAttribute.MethodSignature getMethodSignature(javassist.CtBehavior behaviour)
Gets the MethodSignature for a method/constructor

Parameters:
behaviour - the method/constructor
Returns:
the ClassSignature
Throws:
IllegalArgumentException - if clazz is null

determineHierarchy

public static boolean determineHierarchy(Stack<ClassInfo> hierarchy,
                                         ClassInfo current,
                                         ClassInfo search)
                                  throws javassist.NotFoundException
Figures out the path between the passed in classes

Parameters:
hierarchy - receives the ClassInfos that make up the hierarchy. This parameter may be null, in which case is does not receive the classes
current - the sub class
search - the parent class or interface we are searching for
Returns:
true if the current inherits from search
Throws:
IllegalArgumentException - if current or search is null
javassist.NotFoundException

JBoss Reflection 2.2.1.SP1

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.