// Generated by delombok at Sun Feb 26 12:31:38 KST 2017
package scouter.bytebuddy.utility.privilege;
import java.lang.reflect.AccessibleObject;
import java.security.PrivilegedAction;
/**
* An action for making an {@link AccessibleObject} accessible.
*
* @param <T> The type of the accessible object.
*/
public class SetAccessibleAction<T extends AccessibleObject> implements PrivilegedAction<T> {
/**
* The accessible object.
*/
private final T accessibleObject;
/**
* Creates a new access action.
*
* @param accessibleObject The accessible object.
*/
public SetAccessibleAction(T accessibleObject) {
this.accessibleObject = accessibleObject;
}
@Override
public T run() {
accessibleObject.setAccessible(true);
return accessibleObject;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof SetAccessibleAction)) return false;
final SetAccessibleAction<?> other = (SetAccessibleAction<?>) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$accessibleObject = this.accessibleObject;
final java.lang.Object other$accessibleObject = other.accessibleObject;
if (this$accessibleObject == null ? other$accessibleObject != null : !this$accessibleObject.equals(other$accessibleObject)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof SetAccessibleAction;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $accessibleObject = this.accessibleObject;
result = result * PRIME + ($accessibleObject == null ? 43 : $accessibleObject.hashCode());
return result;
}
}