com.nerdvision.agent.reflect.api.ReflectionImpl Maven / Gradle / Ivy
package com.nerdvision.agent.reflect.api;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class ReflectionImpl implements IReflection
{
@Override
public boolean setAccessible( final Class> clazz, final Field field )
{
try
{
field.setAccessible( true );
return true;
}
catch( final Exception e )
{
return false;
}
}
@Override
public boolean setAccessible( final Class> clazz, final Method method )
{
try
{
method.setAccessible( true );
return true;
}
catch( final Exception e )
{
return false;
}
}
}