Collects and returns all keys required to member-inject the given class.

@param typeKey key causing member injection
@param type class for which required keys are calculated
@return keys required to inject given class
178872
public Collection<Dependency> getMemberInjectionDependencies(
      Key<?> typeKey, TypeLiteral<?> type) {
    Set<Dependency> required = new LinkedHashSet<Dependency>();
    for (MethodLiteral<?, Method> method : memberCollector.getMethods(type)) {
      required.addAll(getDependencies(typeKey, method));
    }

    for (FieldLiteral<?> field : memberCollector.getFields(type)) {
      Key<?> key = getKey(field);
      required.add(new Dependency(typeKey, key, isOptional(field), false,
          "member injection of " + field));
    }
    return required;
  }
19285
public <T> JsonReaderI<T> getMapper(Class<T> type) {
		// look for cached Mapper
		@SuppressWarnings("unchecked")
		JsonReaderI<T> map = (JsonReaderI<T>) cache.get(type);
		if (map != null)
			return map;
		/*
		 * Special handle
		 */
		if (type instanceof Class) {
			if (Map.class.isAssignableFrom(type))
				map = new DefaultMapperCollection<T>(this, type);
			else if (List.class.isAssignableFrom(type))
				map = new DefaultMapperCollection<T>(this, type);
			if (map != null) {
				cache.put(type, map);
				return map;
			}
		}

		if (type.isArray())
			map = new ArraysMapper.GenericMapper<T>(this, type);
		else if (List.class.isAssignableFrom(type))
			map = new CollectionMapper.ListClass<T>(this, type);
		else if (Map.class.isAssignableFrom(type))
			map = new CollectionMapper.MapClass<T>(this, type);
		else
			// use bean class
			map = new BeansMapper.Bean<T>(this, type);
		cache.putIfAbsent(type, map);
		return map;
	}
406302
public static final ClassInfo get(Class<?> type) {
    ClassInfo exist = cache.get(type);
    if (null != exist) return exist;
    synchronized (cache) {
      exist = cache.get(type);
      if (null != exist) return exist;

      Set<MethodInfo> methods = CollectUtils.newHashSet();
      Class<?> nextClass = type;
      int index = 0;
      Map<String, Class<?>> nextParamTypes = null;
      while (null != nextClass && Object.class != nextClass) {
        Method[] declaredMethods = nextClass.getDeclaredMethods();
        for (int i = 0, n = declaredMethods.length; i < n; i++) {
          Method method = declaredMethods[i];
          if (!goodMethod(method)) continue;
          Type[] types = method.getGenericParameterTypes();
          Class<?>[] paramsTypes = new Class<?>[types.length];
          for (int j = 0; j < types.length; j++) {
            Type t = types[j];
            if (t instanceof ParameterizedType) {
              paramsTypes[j] = (Class<?>) ((ParameterizedType) t).getRawType();
            } else if (t instanceof TypeVariable) {
              paramsTypes[j] = nextParamTypes.get(((TypeVariable<?>) t).getName());
            } else {
              paramsTypes[j] = (Class<?>) t;
            }
            if (null == paramsTypes[j]) paramsTypes[j] = Object.class;
          }
          if (!methods.add(new MethodInfo(index++, method, paramsTypes))) index--;
        }

        Type nextType = nextClass.getGenericSuperclass();
        nextClass = nextClass.getSuperclass();
        if (nextType instanceof ParameterizedType) {
          Map<String, Class<?>> tmp = CollectUtils.newHashMap();
          Type[] ps = ((ParameterizedType) nextType).getActualTypeArguments();
          TypeVariable<?>[] tvs = nextClass.getTypeParameters();
          for (int k = 0; k < ps.length; k++) {
            if (ps[k] instanceof Class<?>) {
              tmp.put(tvs[k].getName(), (Class<?>) ps[k]);
            } else if (ps[k] instanceof TypeVariable) {
              tmp.put(tvs[k].getName(), nextParamTypes.get(((TypeVariable<?>) ps[k]).getName()));
            }
          }
          nextParamTypes = tmp;
        } else {
          nextParamTypes = Collections.emptyMap();
        }
      }
      exist = new ClassInfo(methods);
      cache.put(type, exist);
      return exist;
    }
  }
368083
public static List<Field> getAllFields(Class<?> type) {
        List<Field> fields = new ArrayList<>();

        for (Class<?> currentType = type; currentType != null; currentType = currentType.getSuperclass()) {
            fields.addAll(Arrays.asList(currentType.getDeclaredFields()));
        }

        return fields;
    }
1323336
public static <T> T get(Map<?, ?> map, Object key, Class<T> type) {
		return null == map ? null : Convert.convert(type, map.get(key));
	}
1328555
public Optional<MapperInstance> getKeyDeserializer( JType type ) {
        return Optional.fromNullable( keyDeserializers.get( type.getQualifiedSourceName() ) );
    }
1073042
public static <S> ClassTypeInformation<S> from(Class<S> type) {

        LettuceAssert.notNull(type, "Type must not be null!");

        Reference<ClassTypeInformation<?>> cachedReference = CACHE.get(type);
        TypeInformation<?> cachedTypeInfo = cachedReference == null ? null : cachedReference.get();

        if (cachedTypeInfo != null) {
            return (ClassTypeInformation<S>) cachedTypeInfo;
        }

        ClassTypeInformation<S> result = new ClassTypeInformation<S>(type);
        CACHE.put(type, new WeakReference<ClassTypeInformation<?>>(result));
        return result;
    }
526887
public static <T> Key<T> of(Class<T> type,
                              Annotation ann)
  {
    Objects.requireNonNull(type);
    Objects.requireNonNull(ann);

    return new Key<>(type, new Annotation[] { ann });
  }
198063
public <T> T contextGet(Class<T> key)
	{
		synchronized (TypeCheckInfo.class)
		{
			Stack<T> contextStack = lookupListForType(key);
			if (contextStack != null)
			{
				return contextStack.peek();
			}

		}
		return null;
	}
1226770
public static TypeDef typeImplements(TypeDef base, ClassRef... superClass) {
        return new TypeDefBuilder(base)
                .withImplementsList(superClass)
                .build();
    }
548784
public <U extends T> List<U> getAll(Class<U> type) {
        List<U> r = new ArrayList<>();
        for (T t : data)
            if(type.isInstance(t))
                r.add(type.cast(t));
        return r;
    }
1215461
public static <T> Class<?>[] getClasses(Type[] types) {
        if (types == null)
            return null;
        if (types.length == 0)
            return new Class<?>[0];

        Class<?>[] classes = new Class[types.length];
        // Resolve types by chasing down type variables.
        for (int i = 0; i < types.length; i++) {
            classes[i] = getClass(types[i]);
        }
        return classes;
    }
210755
private static Conversion<?> getTypeConversion(
			Object typeKey, Object value) {

		// Check if the provided value is already of the target type
		if (typeKey instanceof Class && ((Class)typeKey)!=Object.class
				&& ((Class)typeKey).isInstance(value)) {
			return IDENTITY_CONVERSION;
		}

		// Find the type conversion object
		return (value instanceof Convertible)
			? ((Convertible)value).getTypeConversion(typeKey)
			: typeConversions.get(typeKey);
	}
1136445
private <T> T getTyped(PropertyKey key, Class<T> clazz) {
        Property p = getProperty(key.m_key);
        
        if (null == p || null == p.getData()) {
            return clazz.cast(m_defaults.get(key));
        }

        return clazz.cast(p.getData());
    }
60440
public <T> T get(String key, Class<T> type) {
        Object value = this.data.get(key);
        if (value != null && type.isAssignableFrom(value.getClass())) {
            return (T) value;
        }
        return null;
    }
21009
public static <T> TypeToken<T> get(Class<T> type)
	{
		return new SimpleTypeToken<T>(type);
	}
488962
public <TYPE> TYPE get(String key, Class<TYPE> type) {
		return cache.get(key, type);
	}