Create a new SmartBinder with from the given types and argument name.

@param retType the type of the return value to start with
@param name    the name of the sole argument
@param type    the sole argument's type
@return a new SmartBinder
495145
public static SmartBinder from(Class<?> retType, String name, Class<?> type) {
        return from(Signature.returning(retType).appendArg(name, type));
    }
154299
public Reference createDefinitionReference(String bindingName, String type, Map<String, Object> properties) throws InjectionException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled()) {
            Map<String, Object> traceProps = properties;
            if (traceProps.containsKey("password")) {
                traceProps = new HashMap<String, Object>(properties);
                traceProps.put("password", "********");
            }

            Tr.entry(tc, "createDefinitionReference: bindingName=" + bindingName + ", type=" + type, traceProps);
        }

        Reference ref;
        try {
            InternalInjectionEngine injectionEngine = (InternalInjectionEngine) InjectionEngineAccessor.getInstance();
            ref = injectionEngine.createDefinitionReference(ivNameSpaceConfig, ivInjectionScope, getJndiName(), bindingName, type, properties);
        } catch (Exception ex) {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "createDefinitionReference", ex);
            throw new InjectionException(ex);
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "createDefinitionReference", ref);
        return ref;
    }
459853
public void setConfigItem(final String name, final String type, final String value) {
        this.configEntry.add(new ConfigItem(name, type, value));
    }
1076488
public String getBindMapperName(BindTypeContext context, TypeName typeName) {
		Converter<String, String> format = CaseFormat.UPPER_CAMEL.converterTo(CaseFormat.LOWER_CAMEL);
		TypeName bindMapperName=TypeUtility.mergeTypeNameWithSuffix(typeName,BindTypeBuilder.SUFFIX);
		String simpleName=format.convert(TypeUtility.simpleName(bindMapperName));
	
		if (!alreadyGeneratedMethods.contains(simpleName))
		{
			alreadyGeneratedMethods.add(simpleName);
			if (bindMapperName.equals(beanTypeName))
			{
				context.builder.addField(FieldSpec.builder(bindMapperName, simpleName, modifiers)					
						.addJavadoc("$T", bindMapperName)
						.initializer("this")
						.build());
			} else {				
				context.builder.addField(FieldSpec.builder(bindMapperName, simpleName, modifiers)					
						.addJavadoc("$T", bindMapperName)
						.initializer("$T.mapperFor($T.class)", BinderUtils.class, typeName)
						.build());	
			}		
		}
		
		return simpleName;
	}
585428
public <A> BindStep<ConfigFactory, A> bind(final Class<A> type) {

        checkNotNull(type);

        return new BindStep<ConfigFactory, A>() {

            @Override
            public ConfigFactory toInstance(A instance) {

                return withBindings(
                    bindings.set(type, checkNotNull(instance))
                );
            }

            @Override
            public ConfigFactory toNothing() {

                return withBindings(
                    bindings.remove(type)
                );
            }
        };
    }
570280
public <T> T createInstance(Class<T> type, String typeName) {
        try {
            return type.cast(getType(typeName).newInstance());
        } catch (InstantiationException | IllegalAccessException e) {
            throw new IllegalArgumentException("Cannot create instance of class " + type.getName(), e);
        }
    }
1019239
public JBBPDslBuilder Custom(final String type, final String name) {
    return this.Custom(type, name, null);
  }
77469
@Override
  public <O extends KbObject> O findOrCreateFunctionalTerm(Class<O> retType, Object... args) 
          throws KbTypeException, CreateException {
    return wrapped().findOrCreateFunctionalTerm(retType, args);
  }
822108
static <A> PredefinedKey<A> valueOf(
        String name,
        Class<A> type
    ) {

        return new PredefinedKey<A>(name, type);

    }
1361678
private Mapper createMapper(Type type) {
    lock.lock();
    try {
      Mapper mapper = cache.get(type);
      if (mapper != null) {
        return mapper;
      }
      if (type instanceof Class) {
        mapper = createMapper((Class<?>) type);
      } else if (type instanceof ParameterizedType) {
        mapper = createMapper((ParameterizedType) type);
      } else {
        throw new IllegalArgumentException(
            String.format("Type %s is neither a Class nor ParameterizedType", type));
      }
      cache.put(type, mapper);
      return mapper;
    } finally {
      lock.unlock();
    }
  }
541525
public T typeface(final String name) {
        if (view != null)
            typeface(getTypeface(name, context));
        return self();
    }
246616
static <T> TypeInfoImpl<T> typeInfoFor(T source, Class<T> sourceType,
      InheritingConfiguration configuration) {
    if (configuration.valueAccessStore.getFirstSupportedReader(sourceType) != null)
      return new TypeInfoImpl<T>(source, sourceType, configuration);
    return typeInfoFor(sourceType, configuration);
  }
1183924
public <S, D> TypeMap<S, D> createEmptyTypeMap(Class<S> sourceType, Class<D> destinationType,
      String typeMapName, InheritingConfiguration configuration, MappingEngineImpl engine) {
    synchronized (lock) {
      TypeMapImpl<S, D> typeMap = new TypeMapImpl<S, D>(sourceType, destinationType, typeMapName,
          configuration, engine);
      typeMaps.put(TypePair.of(sourceType, destinationType, typeMapName), typeMap);
      return typeMap;
    }
  }
36387
private Resolvable createMetadataProvider(Class<?> rawType) {
        Set<Type> types = Collections.<Type>singleton(rawType);
        return new ResolvableImpl(rawType, types, declaringBean, qualifierInstances, delegate);
    }
198664
@Deprecated
    public static <T extends RepositoryBrowser>
    T createInstance(Class<T> type, StaplerRequest req, String fieldName) throws FormException {
        List<Descriptor<RepositoryBrowser<?>>> list = filter(type);
        String value = req.getParameter(fieldName);
        if(value==null || value.equals("auto"))
            return null;

        // TODO: There was a TODO in the original code, which presumes passing something meaningful to the newInstance() JSON param
        // Now we just pass empty JSON in order to make the code compliant with the defined interface
        final JSONObject emptyJSON = new JSONObject();
        return type.cast(list.get(Integer.parseInt(value)).newInstance(req, emptyJSON));
    }
1148416
public <S> ServiceBinder<S> bindServices(final Class<S> type) {
        ServiceBinderImpl<S> binder = new ServiceBinderImpl<S>(type);
        binders.add(binder);
        return binder;
    }
160031
public Binder convert(Class<?> returnType, Class<?>... argTypes) {
        return new Binder(this, new Convert(type()), MethodType.methodType(returnType, argTypes));
    }