Rename fix InvalidMethodSignatureException naming
This commit is contained in:
parent
c473c27298
commit
c14e34cd81
3 changed files with 8 additions and 8 deletions
|
@ -26,13 +26,13 @@ import org.jetbrains.annotations.NotNull;
|
||||||
*
|
*
|
||||||
* @since v1-alpha2
|
* @since v1-alpha2
|
||||||
*/
|
*/
|
||||||
public class InvalidMethodSignature extends Exception {
|
public class InvalidMethodSignatureException extends Exception {
|
||||||
/**
|
/**
|
||||||
* Constructs this exception.
|
* Constructs this exception.
|
||||||
*
|
*
|
||||||
* @param methodName method name
|
* @param methodName method name
|
||||||
*/
|
*/
|
||||||
public InvalidMethodSignature(@NotNull String methodName) {
|
public InvalidMethodSignatureException(@NotNull String methodName) {
|
||||||
super("Method " + methodName + " has a different method signature");
|
super("Method " + methodName + " has a different method signature");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@ import de.staropensource.sosengine.base.EngineConfiguration;
|
||||||
import de.staropensource.sosengine.base.annotation.EventListener;
|
import de.staropensource.sosengine.base.annotation.EventListener;
|
||||||
import de.staropensource.sosengine.base.event.LogEvent;
|
import de.staropensource.sosengine.base.event.LogEvent;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.InstanceMethodFromStaticContextException;
|
import de.staropensource.sosengine.base.exception.reflection.InstanceMethodFromStaticContextException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.InvalidMethodSignature;
|
import de.staropensource.sosengine.base.exception.reflection.InvalidMethodSignatureException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.NoAccessException;
|
import de.staropensource.sosengine.base.exception.reflection.NoAccessException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.StaticInitializerException;
|
import de.staropensource.sosengine.base.exception.reflection.StaticInitializerException;
|
||||||
import de.staropensource.sosengine.base.implementable.Event;
|
import de.staropensource.sosengine.base.implementable.Event;
|
||||||
|
@ -145,7 +145,7 @@ public final class EventHelper {
|
||||||
method.invoke(arguments);
|
method.invoke(arguments);
|
||||||
} catch (NoAccessException exception) {
|
} catch (NoAccessException exception) {
|
||||||
logger.warn("Event listener method " + method.getName() + " could not be called as the method could not be accessed");
|
logger.warn("Event listener method " + method.getName() + " could not be called as the method could not be accessed");
|
||||||
} catch (InvalidMethodSignature exception) {
|
} catch (InvalidMethodSignatureException exception) {
|
||||||
logger.warn("Event listener method " + method.getName() + " has an invalid method signature");
|
logger.warn("Event listener method " + method.getName() + " has an invalid method signature");
|
||||||
} catch (InvocationTargetException exception) {
|
} catch (InvocationTargetException exception) {
|
||||||
logger.crash("Event listener method " + method.getName() + " threw a throwable", exception.getTargetException(), true);
|
logger.crash("Event listener method " + method.getName() + " threw a throwable", exception.getTargetException(), true);
|
||||||
|
|
|
@ -21,7 +21,7 @@ package de.staropensource.sosengine.base.reflection;
|
||||||
|
|
||||||
import de.staropensource.sosengine.base.exception.UnexpectedCheckEndException;
|
import de.staropensource.sosengine.base.exception.UnexpectedCheckEndException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.InstanceMethodFromStaticContextException;
|
import de.staropensource.sosengine.base.exception.reflection.InstanceMethodFromStaticContextException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.InvalidMethodSignature;
|
import de.staropensource.sosengine.base.exception.reflection.InvalidMethodSignatureException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.NoAccessException;
|
import de.staropensource.sosengine.base.exception.reflection.NoAccessException;
|
||||||
import de.staropensource.sosengine.base.exception.reflection.StaticInitializerException;
|
import de.staropensource.sosengine.base.exception.reflection.StaticInitializerException;
|
||||||
import de.staropensource.sosengine.base.internal.reflection.ReflectionAccessWidener;
|
import de.staropensource.sosengine.base.internal.reflection.ReflectionAccessWidener;
|
||||||
|
@ -347,13 +347,13 @@ public final class ReflectionMethod {
|
||||||
* @param args arguments to pass
|
* @param args arguments to pass
|
||||||
* @return method return value
|
* @return method return value
|
||||||
* @throws NoAccessException if access to the method has been denied
|
* @throws NoAccessException if access to the method has been denied
|
||||||
* @throws InvalidMethodSignature if the method signature is incorrect
|
* @throws InvalidMethodSignatureException if the method signature is incorrect
|
||||||
* @throws InvocationTargetException covers exceptions thrown by the method
|
* @throws InvocationTargetException covers exceptions thrown by the method
|
||||||
* @throws InstanceMethodFromStaticContextException when the target method is non-static and called from a static context
|
* @throws InstanceMethodFromStaticContextException when the target method is non-static and called from a static context
|
||||||
* @throws StaticInitializerException when an the static initializer fails
|
* @throws StaticInitializerException when an the static initializer fails
|
||||||
* @since v1-alpha2
|
* @since v1-alpha2
|
||||||
*/
|
*/
|
||||||
public @Nullable Object invoke(Object... args) throws NoAccessException, InvalidMethodSignature, InvocationTargetException, InstanceMethodFromStaticContextException, StaticInitializerException {
|
public @Nullable Object invoke(Object... args) throws NoAccessException, InvalidMethodSignatureException, InvocationTargetException, InstanceMethodFromStaticContextException, StaticInitializerException {
|
||||||
Object returnValue;
|
Object returnValue;
|
||||||
|
|
||||||
// Allow access to method
|
// Allow access to method
|
||||||
|
@ -365,7 +365,7 @@ public final class ReflectionMethod {
|
||||||
} catch (IllegalAccessException exception) {
|
} catch (IllegalAccessException exception) {
|
||||||
throw new NoAccessException("method", getName());
|
throw new NoAccessException("method", getName());
|
||||||
} catch (IllegalArgumentException exception) {
|
} catch (IllegalArgumentException exception) {
|
||||||
throw new InvalidMethodSignature(getName());
|
throw new InvalidMethodSignatureException(getName());
|
||||||
} catch (NullPointerException exception) {
|
} catch (NullPointerException exception) {
|
||||||
throw new InstanceMethodFromStaticContextException(getName());
|
throw new InstanceMethodFromStaticContextException(getName());
|
||||||
} catch (ExceptionInInitializerError exception) {
|
} catch (ExceptionInInitializerError exception) {
|
||||||
|
|
Loading…
Reference in a new issue