public static Object invokeStatic_Object( Class cls, String name, Class[] paramTypes, Object[] args ) { //noinspection ConstantConditions return ReflectUtil.method( cls, name, paramTypes ).invokeStatic( args ); }
public static Object construct( Class type, Class[] paramTypes, Object[] args ) { //noinspection ConstantConditions return ReflectUtil.constructor( type, paramTypes ).newInstance( args ); } }
private static FieldRef addFieldToCache( Class cls, Field f ) { setAccessible( f ); addRawFieldToCache( cls, f ); return new FieldRef( f ); }
private static MethodRef addMethodToCache( Class cls, Method m ) { setAccessible( m ); addRawMethodToCache( cls, m ); return new MethodRef( m ); }
private static ConstructorRef addConstructorToCache( Class cls, Constructor m ) { setAccessible( m ); addRawConstructorToCache( cls, m ); return new ConstructorRef( m ); }
private static FieldRef getFieldFromCache( Class cls, String name ) { Field field = getRawFieldFromCache( cls, name ); if( field != null ) { return new FieldRef( field ); } return null; }
private static ConstructorRef getConstructorFromCache( Class cls, Class... params ) { Constructor ctor = getRawConstructorFromCache( cls, params ); if( ctor != null ) { return new ConstructorRef( ctor ); } return null; }
private static MethodRef getMethodFromCache( Class cls, String name, Class... params ) { Method m = getRawMethodFromCache( cls, name, params ); if( m != null ) { return new MethodRef( m ); } return null; }
public static Object invokeStatic_Object( Class cls, String name, Class[] paramTypes, Object[] args ) { //noinspection ConstantConditions return ReflectUtil.method( cls, name, paramTypes ).invokeStatic( args ); }
public static Object construct( Class type, Class[] paramTypes, Object[] args ) { //noinspection ConstantConditions return ReflectUtil.constructor( type, paramTypes ).newInstance( args ); } }