Resolve solr core/collection name for given type.

@param type
@return empty string if {@link SolrDocument} not present or {@link SolrDocument#solrCoreName()} is blank.
@since 1.1
760314
public static String resolveSolrCoreName(Class<?> type) {
		SolrDocument annotation = AnnotationUtils.findAnnotation(type, SolrDocument.class);
		if (annotation != null && StringUtils.isNotBlank(annotation.solrCoreName())) {
			return annotation.solrCoreName();
		}
		return "";
	}
909579
private Method findResolver(Class type) throws IOException {
        List<Method> resolvers = Util.filter(Index.list(CLIResolver.class, Jenkins.get().getPluginManager().uberClassLoader), Method.class);
        for ( ; type!=null; type=type.getSuperclass())
            for (Method m : resolvers)
                if (m.getReturnType()==type)
                    return m;
        return null;
    }
1076914
public static Type resolveType(Type targetType, Type rootType)
    {
        Type resolvedType;

        if (targetType instanceof ParameterizedType && rootType instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) targetType;

            resolvedType =
                resolveType((Class<?>) parameterizedType.getRawType(), parameterizedType.getActualTypeArguments(),
                    getTypeClass(rootType));
        } else {
            resolvedType = resolveType(getTypeClass(rootType), null, getTypeClass(targetType));
        }

        return resolvedType;
    }
1190737
public static final String getString(Type type) {
        if (type instanceof GenericObjectType) {
            return ((GenericObjectType) type).toString(true);
        } else if (type instanceof ArrayType) {
            return TypeCategory.asString((ArrayType) type);
        } else {
            return type.toString();
        }
    }
1119339
def get_solr_field_type(field_type)
      if field_type.is_a?(Symbol)
        t = TypeMapping[field_type]
        raise "Unknown field_type symbol: #{field_type}" if t.nil?
        t
      elsif field_type.is_a?(String)
        return field_type
      else
        raise "Unknown field_type class: #{field_type.class}: #{field_type}"
      end
    end
664123
public static String nameFromValue(int type) {
        switch (type) {
            case SIMPLE_REFERENCE:
                return TYPENAME_SIMPLE_REFERENCE;
            default:
                return javax.jcr.PropertyType.nameFromValue(type);
        }
    }
210276
public String getLiteralType(Type type) {
		String result = "";
		if (type != null) {
			if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
				ParameterizedType parameterizedType = (ParameterizedType) type;
				result = parameterizedType.toString();
			} else {
				result = ((Class) type).getCanonicalName();
			}
		}
		return result;
	}
384942
public String getTypeNameForCast(Class<?> type) {
        Integer jdbcType = jdbcTypeMapping.get(type);
        if (jdbcType == null) {
            jdbcType = javaTypeMapping.getType(type).getSQLTypes()[0];
        }
        return templates.getCastTypeNameForCode(jdbcType);
    }
1114392
private String getTypeName(ElementDefinition.TypeRefComponent typ) {
    // TODO: This is brittle. There has to be a utility to do this...
    if (typ.hasTargetProfile()) {
      String[] els = typ.getTargetProfile().get(0).getValue().split("/");
      return els[els.length - 1];
    } else if (typ.hasProfile()) {
      String[] els = typ.getProfile().get(0).getValue().split("/");
      return els[els.length - 1];
    } else {
      return typ.getCode();
    }
  }
763306
@SuppressWarnings({ "unchecked", "rawtypes" })
    protected Class<S> resolveClass(Type type) {

        Map<TypeVariable, Type> map = new HashMap<TypeVariable, Type>();
        map.putAll(getTypeVariableMap());

        return (Class<S>) ResolvableType.forType(type, new TypeVariableMapVariableResolver(map)).resolve(Object.class);
    }
331701
private TypeResolver getTypeResolver() {
        TypeResolver typeResolver = scannerContext.peek(TypeResolver.class);
        if (typeResolver == null) {
            throw new IllegalStateException("Cannot find Java type resolver.");
        }
        return typeResolver;
    }
565441
private String getTypeGenericName(Type type)
    {
        StringBuilder sb = new StringBuilder(getTypeName(type));

        if (type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) type;

            Type[] generics = parameterizedType.getActualTypeArguments();
            if (generics.length > 0) {
                sb.append('<');
                for (int i = 0; i < generics.length; ++i) {
                    if (i > 0) {
                        sb.append(',');
                    }
                    sb.append(getTypeGenericName(generics[i]));
                }
                sb.append('>');
            }
        }

        return sb.toString();
    }
1286811
public static boolean nameFilter(String type) {

        if ("date".equals(type) || "object".equals(type)) {
            return false;
        }
        return NAME_FILTER.contains(type);
    }
1081001
private String inferSourceName(TypeElement type) {
    if (!ElementUtil.isPublic(type)) {
      String srcFile = ElementUtil.getSourceFile(type);
      if (srcFile != null && srcFile.endsWith(".java")) {
        int lastSlash = Math.max(srcFile.lastIndexOf('/'), srcFile.lastIndexOf('\\'));
        String baseName = lastSlash > -1 ? srcFile.substring(lastSlash + 1) : srcFile;
        return baseName.substring(0, baseName.length() - 5); // Remove .java suffix.
      }
    }
    return ElementUtil.getName(type);
  }
314282
public static String getValidIdType(String type)
    {
    	if(validationClassMapperforId.get(type) == null){
    		throw new KunderaException("ID of type: "+type+" is not supported for Kundera Oracle NOSQL.");
    	}
        return  validationClassMapperforId.get(type);
    }
901620
public static @CheckForNull <T> T lookup(Class<T> type) {
        Jenkins j = Jenkins.getInstanceOrNull();
        return j != null ? j.lookup.get(type) : null;
    }
68626
public ClassName generatedTypeName(Type type) {
    ClassName abstractAdapterName = abstractAdapterName(type.type());
    return abstractAdapterName != null
        ? abstractAdapterName
        : (ClassName) typeName(type.type());
  }