Factory method to produce an {@link InjectionPoint} that describes the
specified class.

@param cls
@return
514621
public static final <E> InjectionPoint<E> of(Class<E> cls) {
        return new SimpleInjectionPoint<E>(cls);
    }
76848
public static TreeSet<Class<?>> getAllInterfaces(Class<?> cls) {
        final TreeSet<Class<?>> interfacesFound = new TreeSet<>(
            (c1, c2) -> {
                if (c1.equals(c2)) {
                    return 0;
                } else if (c1.isAssignableFrom(c2)) {
                    return 1;
                } else {
                    return -1;
                }
            }
        );
        getAllInterfaces(cls, interfacesFound);
        return interfacesFound;
    }
41363
public static ClassInjector getInstance(ClassLoader loader) {
        ClassInjector injector = null;

        synchronized (cShared) {
            Reference ref = (Reference)cShared.get(loader);
            if (ref != null) {
                injector = (ClassInjector)ref.get();
            }
            if (injector == null) {
                injector = new ClassInjector(loader);
                cShared.put(loader, new WeakReference(injector));
            }
            return injector;
        }
    }
1139293
private Logger createClassLogger(InjectionPoint injectionPoint) {
		return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
	}
535950
def provide(self, cls):
        
        support.verify_class_type(cls, 'cls')
        if not self._is_injectable_fn(cls):
            provide_loc = locations.get_back_frame_loc()
            raise errors.NonExplicitlyBoundClassError(provide_loc, cls)
        try:
            return self._obj_provider.provide_class(
                cls, self._injection_context_factory.new(cls.__init__),
                direct_init_pargs=[], direct_init_kwargs={})
        except errors.Error as e:
            if self._use_short_stack_traces:
                raise e
            else:
                raise
776929
public static <T> T newObject(Class<T> clazz) {
        return getFactory(clazz).newObject(clazz);
    }
752969
def instantiate(self, cls=None):
        
        if cls is None:
            cls = self.cls
        if cls is None:
            raise TypeError("cls must a class")
        return cls.create(*self.args, **self.kwargs)
884878
public static final <T> T defaultFactory(Class<T> cls, String hint)
    {
        try
        {
            return cls.newInstance();
        }
        catch (InstantiationException | IllegalAccessException ex)
        {
            throw new IllegalArgumentException(ex);
        }
    }
574857
@Override
    public InjectionBinding<ConnectionFactoryDefinition> createInjectionBinding(ConnectionFactoryDefinition annotation, Class<?> instanceClass, Member member, String jndiName) throws InjectionException {
        InjectionBinding<ConnectionFactoryDefinition> injectionBinding =
                        new ConnectionFactoryDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
        injectionBinding.merge(annotation, instanceClass, null);
        return injectionBinding;
    }
694716
public static <T> T newInstance(Class<T> clazz) throws ClassInstantiationException {
        if (clazz == null) {
            return null;
        }

        try {
            return clazz.newInstance();
        } catch (Exception e) {
            throw new ClassInstantiationException("Failed to instantiate class: " + clazz.getName(), e);
        }
    }
1285338
@SuppressWarnings("unchecked")
    public static <T> IDomainFactory<T> getFactory(Class<T> clazz) {
        for (IDomainFactory<?> factory : instance) {
            String alias = factory.getAlias(clazz);
            
            if (alias != null) {
                return (IDomainFactory<T>) factory;
            }
        }
        
        throw new IllegalArgumentException("Domain class has no registered factory: " + clazz.getName());
    }
430323
public static <T> T newInstance(final Class<T> clas, final Object... params) {
		try {
			final Class<?>[] paramClasses = JKObjectUtil.toClassesFromObjects(params);
			if (paramClasses.length == 0) {
				return clas.newInstance();
			}
			return ConstructorUtils.invokeConstructor(clas, params);
		} catch (final Exception e) {
			throw new RuntimeException(e);
		}
	}
733271
@Override
  public <T> T instance(InjectionPoint<T> ip)
  {
    Objects.requireNonNull(ip);

    Provider<T> provider = provider(ip);

    if (provider != null) {
      return provider.get();
    }
    else {
      return null;
    }
  }
1363289
@Override
    public InjectionBinding<JMSDestinationDefinition> createInjectionBinding(JMSDestinationDefinition annotation, Class<?> instanceClass, Member member, String jndiName) throws InjectionException {
        InjectionBinding<JMSDestinationDefinition> injectionBinding =
                        new JMSDestinationDefinitionInjectionBinding(jndiName, ivNameSpaceConfig);
        injectionBinding.merge(annotation, instanceClass, null);
        return injectionBinding;
    }
1187788
public Object injectAndPostConstruct(Class<?> Klass) throws InjectionProviderException
    {
        Object instance = null;

        ManagedObject mo = (ManagedObject) ((WASInjectionProvider) getInjectionProvider()).inject(Klass, true, _externalContext);
        instance = mo.getObject();
        
        if (instance instanceof FacesWrapper)
        {
            Object innerInstance = ((FacesWrapper)instance).getWrapped();
            if (innerInstance != null)
            {
                injectAndPostConstruct(innerInstance);
            }
        }

        return instance;
    }
1317312
public <E> ClassFactory<E> createFactory(String... classes) {
    try {
      return new ClassFactory<E>(classname, classes);
    } catch (ClassCreationException e){
      throw e;
    } catch (Exception e) {
      throw new ClassCreationException(e);
    }
  }
1294574
public static <T> Parameters.Builder<T> logger(Class<?> cls) {
        return Parameters.<T> builder().logger(cls);
    }