@param  object $classInstance
@param  string $method
@param  array  $args          [optional]

@return mixed
165247
protected function callOnceBeforeMethodHooks($classInstance, $method, array $args = [])
    {
        $method = self::getCalledMethod($method);

        $onceBeforeMethodName = 'onceBefore'.ucfirst($method);
        if ( ! isset($this->instanceOnceCalledMethods['before'][$onceBeforeMethodName])) {
            if (isset($this->hooks[$onceBeforeMethodName])) {
                foreach ($this->hooks[$onceBeforeMethodName] as $callable) {
                    try {
                        $return = $this->callCallable($classInstance, $callable, $args, $method, false);
                    } catch (CancelPropagationException $e) {
                        break;
                    }

                    if ($return !== null) {
                        return $return;
                    }
                }

                $this->instanceOnceCalledMethods['before'][$onceBeforeMethodName] = true;
            }
        }

        $return = $this->callGlobalOnceBeforeMethodHooks($classInstance, $method, $onceBeforeMethodName);

        if ($return !== null) {
            return $return;
        }
    }
881260
public function invoke($object, $method, array $arguments = [])
    {
        $reflection = new \ReflectionClass($object);
        $method = $reflection->getMethod($method);
        $args = $this->resolveArguments($method, $arguments);

        return $method->invokeArgs($object, $args);
    }
438173
protected function callQueueMethodOnHandler($class, $method, $arguments)
	{
		$handler = (new ReflectionClass($class))->newInstanceWithoutConstructor();

		$handler->queue($this->resolveQueue(), 'Illuminate\Events\CallQueuedHandler@call', [
			'class' => $class, 'method' => $method, 'data' => serialize($arguments),
		]);
	}
489179
protected function queueHandler($class, $method, $arguments)
    {
        list($listener, $job) = $this->createListenerAndJob($class, $method, $arguments);

        $connection = $this->resolveQueue()->connection(
            isset($listener->connection) ? $listener->connection : null
        );

        $queue = isset($listener->queue) ? $listener->queue : null;

        isset($listener->delay)
            ? $connection->laterOn($queue, $listener->delay, $job)
            : $connection->pushOn($queue, $job);
    }
93361
public function make($classname, ...$args)
    {
        $resource = $this->resolve($classname);
        return $resource->make(...$args);
    }
623586
public function getParameters(string $class, string $method = null){
        if(!class_exists($class)){
            throw new \InvalidArgumentException();
        }

        if($method !== null && !method_exists($class, $method)){
            throw new \InvalidArgumentException();
        }

        if(!array_key_exists($class, $this->params)){
            $this->params[$class]   = [];
        }

        $method = $method === null ? "__construct" : $method;

        if(!array_key_exists($method, $this->params[$class])){
            if($method === "__construct" && !method_exists($class, $method)){
                $reflection = null;
            }else{
                $reflection = $this->getClass($class)->getMethod($method);
            }

            $this->params[$class][$method]  = $reflection === null
                ? []
                : $reflection->getParameters()
            ;
        }

        return $this->params[$class][$method];
    }
1270570
private function executeMethod($method, $args = [])
    {
        if (method_exists($this, $method)) {
            return call_user_func_array([$this, $method], $args);
        }
    }
886287
public function callClassMethod($class, $method, ...$arguments)
	{
		$resolvedParameters = [];
		$reflectedClass = new ReflectionCLass($class);
		if (!$reflectedClass->hasMethod($method)) {
			throw new ReflectionException('Call to undefined method ' . $method);
		}

		$methodName = $method;
		$method = $reflectedClass->getMethod($method);
		$methodParameters = $method->getParameters();

		if (count($methodParameters) < 1) {
			return $method;
		}

		$resolvedParameters = array_map(function($param) use ($reflectedClass) {
			$type = $param->getType();

			if (preg_match("/(.*?)\\\/", $type)) {
				$type = (String) $type;
				return new $type;
			}

			if (!$param->isDefaultValueAvailable()) {
				return $param = '';
			}

			return $param->getDefaultValue();
			
		}, $methodParameters);

		$resolvedParameters = array_filter($resolvedParameters);
		$resolvedParameters = array_merge($resolvedParameters, $arguments);

		if ($methodName == '__construct') {
			return $reflectedClass->newInstanceArgs($resolvedParameters);
		}

		return $method->invokeArgs($class, $resolvedParameters);
	}
63989
protected function payloadExec($method, $args = []) {
        $this->getPayloadInstance();
        if (method_exists($this->instance, $method)) {
            return $this->di->call([$this->instance, $method], $args);
        }
        return null;
    }
1005001
public function newInstance($className, array $args = array())
    {
        return $this->getApplication()->search(ProviderInterface::IDENTIFIER)->newInstance($className, $args);
    }
864019
protected function callOnceBeforeAllHooks($classInstance, $method)
    {
        $method = self::getCalledMethod($method);

        $hooks = $this->hooks['once']['beforeAll'];

        if ( ! $this->instanceOnceBeforeAllCalled && $hooks) {

            if ( ! empty($hooks)) {
                $return = $this->callAllHookCallables($classInstance, $method, $hooks);

                $this->instanceOnceBeforeAllCalled = true;

                if ($return !== null) {
                    return $return;
                }
            }
        }

        $staticHooks = self::$staticHooks['global']['once']['beforeAll'];

        if ( ! $this->globalOnceBeforeAllCalled && $staticHooks) {
            if ( ! empty($staticHooks)) {
                $return = $this->callAllHookCallables($classInstance, $method, $staticHooks);

                $this->globalOnceBeforeAllCalled = true;

                if ($return !== null) {
                    return $return;
                }
            }
        }
    }
413582
public function collection($classname, ...$args)
    {
        $resource = $this->resolve($classname);
        return $resource->collection(...$args);
    }
1343483
public function instanciate(string $class_name, ...$args): Interfaces\JavaObject
    {
        try {
            $java = new Java($class_name, ...$args);
        } catch (Pjb62BrokenConnectionException | Exception\InvalidUsageException $e) {
            PjbProxyClient::unregisterInstance();
            throw new BrokenConnectionException($e->getMessage(), $e->getCode(), $e);
        }

        return $java;
    }
329239
public function getMethod($classname, $method)
    {
        return $this->hasMethod($classname, $method)
            ? $this->methods[$classname . '::' . $method]
            : [];
    }
735016
public static function createObject( $className, $arguments = array() )
	{
		if( !class_exists( $className ) )
			throw new RuntimeException( 'Class "'.$className.'" has not been loaded' );
		$class	= new ReflectionClass( $className );
		if( $arguments )
			$object	= $class->newInstanceArgs( $arguments );
		else
			$object	= $class->newInstance();
		return $object;
	}
556726
protected function callBeforeMethodHooks($classInstance, $method, array $args = [])
    {
        $method = self::getCalledMethod($method);

        $beforeMethodCallableName = 'before'.ucfirst($method);

        $hooks = isset($this->hooks[$beforeMethodCallableName]) ? $this->hooks[$beforeMethodCallableName] : [];

        $staticHooks = isset(self::$staticHooks['global'][$beforeMethodCallableName]) ?
            self::$staticHooks['global'][$beforeMethodCallableName] : [];

        $hooks = array_merge($hooks, $staticHooks);

        if ( ! empty($hooks)) {
            foreach ($hooks as $callable) {
                try {
                    $return = $this->callCallable($classInstance, $callable, $args, $method, false);
                } catch (CancelPropagationException $e) {
                    break;
                }

                if ($return !== null) {
                    return $return;
                }
            }
        }
    }
315899
public function injector($classname, $method = null)
    {
        $params = [];
        $reflection = new \ReflectionClass($classname);

        if (is_null($method)) {
            $method = "__invoke";
        }

        $parameters = $reflection->getMethod($method)->getParameters();

        foreach ($parameters as $parameter) {
            $class = $parameter->getClass();

            if (is_null($class)) {
                continue;
            }

            $constructor = $class->getName();

            if (! class_exists($constructor, true)) {
                continue;
            }

            if (!in_array(strtolower($constructor), $this->getInjectorExceptedType())) {
                if (method_exists($constructor, 'getInstance')) {
                    $params[] = $constructor::getInstance();
                } else {
                    $params[] = new $constructor();
                }
            }
        }

        return $params;
    }