001package co.codewizards.cloudstore.ls.core.invoke.filter;
002
003import static java.util.Objects.*;
004
005import co.codewizards.cloudstore.ls.core.invoke.MethodInvocationRequest;
006import co.codewizards.cloudstore.ls.core.invoke.ObjectManager;
007
008public class ExtMethodInvocationRequest {
009
010        private final ObjectManager objectManager;
011        private final MethodInvocationRequest methodInvocationRequest;
012        private final Class<?> targetClass;
013
014        public ExtMethodInvocationRequest(final ObjectManager objectManager, final MethodInvocationRequest methodInvocationRequest, final Class<?> targetClass) {
015                this.objectManager = requireNonNull(objectManager, "objectManager");
016                this.methodInvocationRequest = requireNonNull(methodInvocationRequest, "methodInvocationRequest");
017                this.targetClass = targetClass == null ? methodInvocationRequest.getObject().getClass() : targetClass;
018                requireNonNull(this.targetClass, "this.targetClass");
019        }
020
021        public ObjectManager getObjectManager() {
022                return objectManager;
023        }
024
025        public MethodInvocationRequest getMethodInvocationRequest() {
026                return methodInvocationRequest;
027        }
028
029        public Class<?> getTargetClass() {
030                return targetClass;
031        }
032}