MethodAccessiblePrivilegedAction.java :  » Web-Services » crispy » net » sf » crispy » util » Java Open Source

Java Open Source » Web Services » crispy 
crispy » net » sf » crispy » util » MethodAccessiblePrivilegedAction.java
package net.sf.crispy.util;

import java.lang.reflect.Method;
import java.security.PrivilegedAction;

import net.sf.crispy.impl.ServiceManager;

/**
 * Check the Permission for <code>setAccessible(true)</code>.
 * 
 * @author Linke
 *
 */
public class MethodAccessiblePrivilegedAction implements PrivilegedAction {

  private final Method method;
  
  public MethodAccessiblePrivilegedAction(Method pvMethod) {
    method = pvMethod;
  }
  
  public Object run() {
    try {
      method.setAccessible(true);
    } catch (Exception e) {
      if (ServiceManager.DEBUG_MODE_ON == true) {
        e.printStackTrace();
      }
      
    }
    return null;
  }
  

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.