Create a proxy for a file in a different project.

@param remoteRef
PBXContainerItemProxy for reference.
@param dependency
dependency.
@return PBXContainerItemProxy.
512792
private static PBXObjectRef createPBXReferenceProxy(final PBXObjectRef remoteRef, final DependencyDef dependency) {
    final Map map = new HashMap();
    map.put("isa", "PBXReferenceProxy");
    final String fileType = "compiled.mach-o.dylib";
    map.put("fileType", fileType);
    map.put("remoteRef", remoteRef);
    map.put("path", dependency.getFile().getName() + ".dylib");
    map.put("sourceTree", "BUILT_PRODUCTS_DIR");
    return new PBXObjectRef(map);
  }
9156
public RemoteTask createRemoteTask(Map<String, Object> properties) throws RemoteException
    {   // Note: This new task's parent is MY application!
        BaseTransport transport = this.createProxyTransport(CREATE_REMOTE_TASK); // Don't use my method yet, since I don't have the returned ID
        transport.addParam(PROPERTIES, properties);
        String strID = (String)transport.sendMessageAndGetReply();
        return new TaskProxy((ApplicationProxy)m_parentProxy, strID);   // Note the parent is MY PARENT not ME. (just like the remote hierarchy)
    }
288624
public static <T extends Annotation> MethodInvokeProxy proxyByAnnotation(Object target,Class<T> annotationClass,Object ...args)
	{
		Method m=findMethodByAnnotation(target,annotationClass);
		if(m!=null)
		{
			return new MethodInvokeProxy(target, m, args);
		}
		return null;
	}
1297359
private JMXConnector createConnector(JmxRequest pJmxReq) throws IOException {
        ProxyTargetConfig targetConfig = pJmxReq.getTargetConfig();
        if (targetConfig == null) {
            throw new IllegalArgumentException("No proxy configuration in request " + pJmxReq);
        }
        String urlS = targetConfig.getUrl();
        if (!acceptTargetUrl(urlS)) {
            throw new SecurityException(String.format("Target URL %s is not allowed by configuration", urlS));
        }

        JMXServiceURL url = new JMXServiceURL(urlS);

        Map<String,Object> env = prepareEnv(targetConfig.getEnv());
        return JMXConnectorFactory.newJMXConnector(url,env);
    }
327680
public RemoteProxy remove(RemoteProxy proxy) {
    // Find the original proxy. While the supplied one is logically equivalent, it may be a fresh object with
    // an empty TestSlot list, which doesn't figure into the proxy equivalence check.  Since we want to free up
    // those test sessions, we need to operate on that original object.
    for (RemoteProxy p : proxies) {
      if (p.equals(proxy)) {
        proxies.remove(p);
        return p;
      }
    }
    throw new IllegalStateException("Did not contain proxy" + proxy);
  }
569451
public <T> T proxy(final T src, Class<T> tClass) {
        return callbackExtension.proxy(src, tClass);
    }
699892
def create_dependency_on(target)
      
      @properties['target'] = target.identifier
      
      container_item_proxy = ContainerItemProxy.default target.project.project.identifier, target.identifier, target.name
      container_item_proxy = @registry.add_object(container_item_proxy)
      
      @properties['targetProxy'] = container_item_proxy.identifier
      
      save!
    end
124063
@Override
    protected Connection proxyConnection(Connection target, ConnectionCallback callback) {
        return new ConnectionDecorator(target, callback);
    }
1199042
private static RemoteObjectSource openObjectSource(ServiceInfo serviceInfo) {
        try {
            return new RemoteObjectSource(serviceInfo);
        } catch (ServiceException e) {
            throw new IllegalStateException("Failed to initialize "
                    + "the ValidatorProcess: ", e);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to initialize "
                    + "the ValidatorProcess: ", e);
        }
    }
941085
protected ProxyArtifactStore createProxyArtifactStore()
    {
        return new ProxyArtifactStore( repositoryMetadataManager, remoteArtifactRepositories, remotePluginRepositories,
                                       localRepository, artifactFactory, artifactResolver, archetypeManager, getLog() );
    }
428686
@SuppressWarnings("unchecked")
    public static void injectConstructorProxies(Object o,
                                                AbstractResourceInfo cri,
                                                Message m) {

        Map<Class<?>, ThreadLocalProxy<?>> proxies = cri.getConstructorProxies();
        if (proxies != null) {
            for (Map.Entry<Class<?>, ThreadLocalProxy<?>> entry : proxies.entrySet()) {
                Object value = JAXRSUtils.createContextValue(m, entry.getKey(), entry.getKey());
                ((ThreadLocalProxy<Object>) entry.getValue()).set(value);
            }
        }
    }
892747
public DependencyInfo createDependencyInfo(File basedir, String filename) {
        DependencyInfo dependency;
        try {
            File dependencyFile = new File(basedir, filename);
            String sha1 = ChecksumUtils.calculateSHA1(dependencyFile);
            dependency = new DependencyInfo(sha1);
            dependency.setArtifactId(dependencyFile.getName());
            dependency.setFilename(dependencyFile.getName());

            // system path
            try {
                dependency.setSystemPath(dependencyFile.getCanonicalPath());
            } catch (IOException e) {
                dependency.setSystemPath(dependencyFile.getAbsolutePath());
            }

            // populate hints
            if (calculateHints) {
                DependencyHintsInfo hints = HintUtils.getHints(dependencyFile.getPath());
                dependency.setHints(hints);
            }

            // additional sha1s
            // MD5
            if (calculateMd5) {
                String md5 = ChecksumUtils.calculateHash(dependencyFile, HashAlgorithm.MD5);
                dependency.addChecksum(ChecksumType.MD5, md5);
            }

            // handle JavaScript files
            if (filename.toLowerCase().matches(JAVA_SCRIPT_REGEX)) {
                Map<ChecksumType, String> javaScriptChecksums;
                try {
                    javaScriptChecksums = new HashCalculator().calculateJavaScriptHashes(dependencyFile);
                    if (javaScriptChecksums == null || javaScriptChecksums.isEmpty()) {
                        logger.debug("Failed to calculate javaScript hash: {}", dependencyFile.getPath());
                    }
                    for (Map.Entry<ChecksumType, String> entry : javaScriptChecksums.entrySet()) {
                        dependency.addChecksum(entry.getKey(), entry.getValue());
                    }
                } catch (Exception e) {
                    logger.warn("Failed to calculate javaScript hash for file: {}, error: {}", dependencyFile.getPath(), e.getMessage());
                    logger.debug("Failed to calculate javaScript hash for file: {}, error: {}", dependencyFile.getPath(), e.getStackTrace());
                }
            }
            // other platform SHA1
            ChecksumUtils.calculateOtherPlatformSha1(dependency, dependencyFile);
            // super hash
            ChecksumUtils.calculateSuperHash(dependency, dependencyFile);
        } catch (IOException e) {
            logger.warn("Failed to create dependency " + filename + " to dependency list: {}", e.getMessage());
            dependency = null;
        }
        return dependency;
    }
559732
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.FeedItemTargetServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.FeedItemTargetServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.FeedItemTargetServiceSoapBindingStub(new java.net.URL(FeedItemTargetServiceInterfacePort_address), this);
                _stub.setPortName(getFeedItemTargetServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
1259901
public EjbRemoteServiceModel getOrCreate(Iterable<ProjectModel> applications, JavaClassModel remoteInterface, JavaClassModel implementationClass)
    {
        GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V();
        pipeline.has(WindupVertexFrame.TYPE_PROP, EjbRemoteServiceModel.TYPE);
        if (remoteInterface != null)
            pipeline.as("remoteInterface").out(EjbRemoteServiceModel.EJB_INTERFACE)
                    .filter(vertexTraverser -> vertexTraverser.get().equals(remoteInterface.getElement()))
                    .select("remoteInterface");

        if (implementationClass != null)
            pipeline.as("implementationClass").out(EjbRemoteServiceModel.EJB_IMPLEMENTATION_CLASS)
                        .filter(vertexTraverser -> vertexTraverser.get().equals(implementationClass.getElement()))
                        .select("implementationClass");

        if (pipeline.hasNext())
        {
            EjbRemoteServiceModel result = frame(pipeline.next());
            for (ProjectModel application : applications)
            {
                if (!Iterables.contains(result.getApplications(), application))
                    result.addApplication(application);
            }
            return result;
        }
        else
        {
            EjbRemoteServiceModel model = create();
            model.setApplications(applications);
            model.setInterface(remoteInterface);
            model.setImplementationClass(implementationClass);
            return model;
        }
    }
852827
public final J4pClientBuilder proxy(String pProxyHost, int pProxyPort, String pProxyUser, String pProxyPass) {
        httpProxy = new Proxy(pProxyHost,pProxyPort, pProxyUser,pProxyPass);
        return this;
    }
675704
public static MethodHandleProxy proxyMethod(Object target,String methodName,Object ...args)
	{
		MethodHandle mh=findMethodHandle(target, methodName, args);
		if(mh!=null)
		{
			return new MethodHandleProxy(target, mh, args);
		}
		return null;
	}
402394
public static Registry createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
		synchronized(registryCache) {
			Integer portObj = port;
			Registry registry = registryCache.get(portObj);
			if(registry==null) {
				registry = LocateRegistry.createRegistry(port, csf, ssf);
				registryCache.put(portObj, registry);
			}
			return registry;
		}
	}