Produces the proxy class name for the given definition.
517412
private function getProxyClassName(Definition $definition): string
    {
        $class = $this->proxyGenerator->getProxifiedClass($definition);

        return preg_replace('/^.*\\\\/', '', $class).'_'.$this->getIdentifierSuffix($definition);
    }
1348817
private Class getDynamicProxyClass(Class baseClass) {
        Class[] m_dynamicProxyClassInterfaces;
        if (foundInterfaces.containsKey(baseClass)) {
            m_dynamicProxyClassInterfaces = (Class[])foundInterfaces.get(baseClass);
        } else {
            m_dynamicProxyClassInterfaces = getInterfaces(baseClass);
            foundInterfaces.put(baseClass, m_dynamicProxyClassInterfaces);
        }

        // return dynymic Proxy Class implementing all interfaces
        Class proxyClazz = Proxy.getProxyClass(baseClass.getClassLoader(), m_dynamicProxyClassInterfaces);
        return proxyClazz;
    }
685325
function makeProxy(definition, names, send, rootDefinition) {
    if (! names) throw new Error("No name proxying definition " + JSON.stringify(definition));
    if (! Array.isArray(names)) names = [ names ];

    /* All definitions are objects! */
    if (typeof(definition) !== 'object') {
      throw new Error("Wrong proxy definition at " + names.join('.') + " for \n"
                    + JSON.stringify(rootDefinition, null, 1));
    }

    /* Initial object */
    var object = {};

    /* Function definitions, can be also at top level */
    if (definition['!$invocable$!'] === true) {
      var clone = names.slice(0);

      /* Can be called as "new F()" or "f()" */
      var Invocable = function() {

        /* Prepare our message */
        var message = { proxy: { proxy: clone, arguments: arguments }};

        /* Is this "new F()" or a normal call? */
        if (this instanceof Invocable) {
          message.newInstance = true;
          ProxyPromise.call(this, message, send);
          this.asProxy(true);
        } else {
          return new ProxyPromise(message, send);
        }
      }

      /* Functions can have members, so keep processing */
      object = Invocable;

    }

    /* Clone all the members of the definition */
    for (var i in definition) {
      (function(i) {
        var child = definition[i];
        var clone = names.slice(0);
        clone.push(i);

        /* Basic properties for the object to define */
        var props = { enumerable: true, configurable: false };

        /* Function definitions */
        if (child['!$invocable$!'] === true) {
          props.value = makeProxy(child, clone, send, rootDefinition);
        }

        /* Setters/getters definitions */
        else if (child.hasOwnProperty('!$value$!')) {
          var initialValue = child['!$value$!'];
          props['get'] = function() {
            var message = { proxy: { proxy: clone } };
            var promise = new ProxyPromise(message, send, initialValue);
            promise.asProxy = function() { return promise } // already a proxy
            promise.then(function(success) { initialValue = success });
            return promise; // return the original ProxyPromise instance
          };
          props['set'] = function(value) {
            initialValue = value;
            send({ proxy: { value: value, proxy: clone } })
              .then(function(success) { initialValue = success });
          };
        }

        /* Nested definitions get recursively processed */
        else if (typeof(child) === 'object') {
          props.value = makeProxy(child, clone, send, rootDefinition);
        }

        else if (i !== '!$invocable$!') {
          throw new Error("Wrong proxy definition at " + names.join('.') + "." + i + " for \n"
                        + JSON.stringify(rootDefinition, null, 1));
        }

        /* Define the properties for this */
        Object.defineProperty(object, i, props);
      })(i);
    }

    /* All done, return our object clone */
    return object;
  }
261587
public boolean isProxyClassDefined(ClassLoader classLoader) {
        try {
            // first check that the proxy has not already been created
            classLoader.loadClass(this.className);
            return true;
        } catch (ClassNotFoundException e) {
            return false;
        }
    }
243539
def _generate_request_handler_proxy(handler_class, handler_args, name):
    """"""

    @scope.inject
    def request_handler_wrapper(app, handler, **kwargs):
        handler = handler_class(app, handler.request, **handler_args)
        handler._execute([], **kwargs)
    request_handler_wrapper.__name__ = name
    request_handler_wrapper.handler_class = handler_class
    request_handler_wrapper.handler_args = handler_args

    return request_handler_wrapper
1287283
public static String getProxyTypeAsString(GSIConstants.CertificateType proxyType) {
        switch(proxyType) {
        case GSI_4_IMPERSONATION_PROXY:
            return "RFC 3820 compliant impersonation proxy";
        case GSI_4_INDEPENDENT_PROXY:
            return "RFC 3820 compliant independent proxy";
        case GSI_4_LIMITED_PROXY:
            return "RFC 3820 compliant limited proxy";
        case GSI_4_RESTRICTED_PROXY:
            return "RFC 3820 compliant restricted proxy";
        case GSI_3_IMPERSONATION_PROXY:
            return "Proxy draft compliant impersonation proxy";
        case GSI_3_INDEPENDENT_PROXY:
            return "Proxy draft compliant independent proxy";
        case GSI_3_LIMITED_PROXY:
            return "Proxy draft compliant limited proxy";
        case GSI_3_RESTRICTED_PROXY:
            return "Proxy draft compliant restricted proxy";
        case GSI_2_PROXY:
            return "full legacy globus proxy";
        case GSI_2_LIMITED_PROXY:
            return "limited legacy globus proxy";
        default:
            return "not a proxy";
        }
    }
1311610
public <T> T as(Class<T> type) {
        return type.cast(Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new InvocationHandler() {
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                if (method.getDeclaringClass() == Object.class)
                    return method.invoke(this, args);

                Configuration cn = method.getAnnotation(Configuration.class);

                Class<?> r = method.getReturnType();
                String key = getKey(method,cn);

                String v = source.apply(key);
                if (v==null && cn!=null && !cn.defaultValue().equals(UNSPECIFIED))
                    v = cn.defaultValue();

                if (v==null)    return null;    // TODO: check how the primitive types are handled here

                return ConvertUtils.convert(v,r);
            }

            private String getKey(Method method, Configuration c) {
                if (c!=null && !c.name().equals(UNSPECIFIED))
                    return c.name();        // name override

                String n = method.getName();
                for (String p : GETTER_PREFIX) {
                    if (n.startsWith(p))
                        return Introspector.decapitalize(n.substring(p.length()));
                }
                return n;
            }
        }));
    }
861781
public static String generatedNameOf(Class<?> clazz, Class<? extends Annotation> annotationClass)
    {
        return builder(clazz, annotationClass).build();
    }
1309418
def proxy(name, default = None):
    
    proxymodule = _ProxyMetaClass(name, (_ProxyModule,), {'_default': default})
    proxymodule.__module__ = sys._getframe(1).f_globals.get('__name__')
    return proxymodule
165754
@SuppressWarnings("unchecked")
    public Class<? extends T> defineClass() {
        if (generatedClass == null) {
            synchronized (this) {
                if (generatedClass == null) {
                    try {
                        // first check that the proxy has not already been created
                        generatedClass = (Class<? extends T>) classLoader.loadClass(this.className);
                    } catch (ClassNotFoundException e) {
                        buildClassDefinition();
                        if (protectionDomain == null) {
                            generatedClass = (Class<? extends T>) classFile.define();
                        } else {
                            generatedClass = (Class<? extends T>) classFile.define(protectionDomain);
                        }
                        afterClassLoad(generatedClass);
                    }
                    classFile = null;
                }
            }
        }
        return generatedClass;
    }
491525
public static String unwrapProxyClassName(Class<?> type)
   {
      String typeName = null;
      if (type != null)
      {
         if (type.getName().contains("$$EnhancerByCGLIB$$"))
         {
            typeName = CGLIB_CLASSNAME_REGEXP.matcher(type.getName()).replaceAll("$1");
         }
         else if (type.getName().contains("_jvst"))
         {
            typeName = JAVASSIST_CLASSNAME_REGEXP.matcher(type.getName()).replaceAll("$1");
         }
         else
         {
            typeName = type.getName();
         }
      }
      return typeName;
   }
1212561
def proxy_alias(alias_name, node_type):
    """"""
    proxy = type(
        alias_name,
        (lazy_object_proxy.Proxy,),
        {
            "__class__": object.__dict__["__class__"],
            "__instancecheck__": _instancecheck,
        },
    )
    return proxy(lambda: node_type)
929114
@Override
   public String getClassName(Definition def)
   {
      return def.getAdminObjects().get(numOfAo).getAdminObjectClass();
   }
1270645
function javaClassConstructorProxy() {
    var args = [name];
    for (var i = 0; i < arguments.length; i++) {
      args.push(arguments[i]);
    }
    return java.newInstanceSync.apply(java, args);
  }
43774
public Object getName(String methodName) {
        if (getProxyBuilder().nameMappingClosure != null) {
            return getProxyBuilder().nameMappingClosure.call(methodName);
        }
        return methodName;
    }
621840
private String proxyClassName()
  {
    String simpleName = _proxyClass.getSimpleName();
    int p = simpleName.lastIndexOf("__");
    
    if (p > 0) {
      return simpleName.substring(0, p);
    }
    else {
      return simpleName;
    }
  }
606049
def _get_proxy_object(self, obj, ProxyKlass, proxy_klass_attribute):
        
        proxy_object = obj
        if not isinstance(obj, ProxyKlass):
            proxy_object = ProxyKlass(**{proxy_klass_attribute: obj})
        return proxy_object