Package org.jboss.weld.util.reflection
Class DeclaredMemberIndexer
- java.lang.Object
-
- org.jboss.weld.util.reflection.DeclaredMemberIndexer
-
public final class DeclaredMemberIndexer extends Object
- Author:
- Martin Kouba
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Constructor<T>getConstructorForIndex(int index, Class<T> declaringClass)static List<Constructor<?>>getDeclaredConstructors(Class<?> declaringClass)static List<Field>getDeclaredFields(Class<?> declaringClass)static List<Method>getDeclaredMethods(Class<?> declaringClass)static FieldgetFieldForIndex(int index, Class<?> declaringClass)static intgetIndexForConstructor(Constructor<?> constructor)static intgetIndexForField(Field field)static intgetIndexForMethod(Method method)static MethodgetMethodForIndex(int index, Class<?> declaringClass)
-
-
-
Method Detail
-
getIndexForField
public static int getIndexForField(Field field)
- Parameters:
field-- Returns:
- the index for the given field
-
getFieldForIndex
public static Field getFieldForIndex(int index, Class<?> declaringClass)
- Parameters:
index-declaringClass-- Returns:
- the declared field for the given index and declaring class
- Throws:
IndexOutOfBoundsException- if the index is out of range
-
getIndexForMethod
public static int getIndexForMethod(Method method)
- Parameters:
method-- Returns:
- the index for the given method
-
getMethodForIndex
public static Method getMethodForIndex(int index, Class<?> declaringClass)
- Parameters:
index-declaringClass-- Returns:
- the declared method for the given index and declaring class
- Throws:
IndexOutOfBoundsException- if the index is out of range
-
getIndexForConstructor
public static int getIndexForConstructor(Constructor<?> constructor)
- Parameters:
constructor-- Returns:
- the index for the given constructor
-
getConstructorForIndex
public static <T> Constructor<T> getConstructorForIndex(int index, Class<T> declaringClass)
- Parameters:
index-declaringClass-- Returns:
- the declared constructor for the given index and declaring class
- Throws:
IndexOutOfBoundsException- if the index is out of range
-
getDeclaredFields
public static List<Field> getDeclaredFields(Class<?> declaringClass)
- Parameters:
declaringClass-- Returns:
- the ordered list of declared fields for the given class
-
getDeclaredMethods
public static List<Method> getDeclaredMethods(Class<?> declaringClass)
- Parameters:
declaringClass-- Returns:
- the ordered list of declared methods for the given class
-
getDeclaredConstructors
public static List<Constructor<?>> getDeclaredConstructors(Class<?> declaringClass)
- Parameters:
declaringClass-- Returns:
- the ordered list of declared constructors for the given class
-
-