/**
  * @param ReflectionFunctionAbstract $function
  * @return AbstractFunctionInfo
  */
 public static function create(ReflectionFunctionAbstract $function)
 {
     if ($function instanceof ReflectionMethod) {
         return MethodInfo::create($function);
     } else {
         throw new RuntimeException("reflector is not supported");
     }
 }
 public static function create(ReflectionParameter $parameter)
 {
     $methodInfo = MethodInfo::create($parameter->getDeclaringFunction());
     return new ParameterInfo($methodInfo, $parameter);
 }