Get a message bundle of the given type.  Equivalent to <code>{@link #getBundle(Class, java.util.Locale) getBundle}(type, Locale.getDefault())</code>.

@param type the bundle type class
@param <T> the bundle type
@return the bundle
322386
public static <T> T getBundle(Class<T> type) {
        return getBundle(type, Locale.getDefault());
    }
585581
public ResourceBundle getResourceBundle() {
        if (bundle == null) {
            String lang = "";
            String country = "";
            final String _locale = getPm().getCfg().getProperty("locale", "");
            if (_locale != null && !"".equals(_locale.trim())) {
                final String[] __locale = _locale.split("[_]");
                lang = __locale[0];
                if (__locale.length > 1) {
                    country = __locale[1];
                }
            }
            final Locale locale = new Locale(lang, country);
            bundle = ResourceBundle.getBundle("ApplicationResource", locale);
        }
        return bundle;
    }
1041903
public <T> T getHeader(String name, Class<T> type) {
    return (T) headers.get(name);
  }
217512
public static Type getArrayComponentType(Type type) {
        if (type instanceof GenericArrayType) {
            return GenericArrayType.class.cast(type).getGenericComponentType();
        }
        if (type instanceof Class<?>) {
            Class<?> clazz = (Class<?>) type;
            if (clazz.isArray()) {
                return clazz.getComponentType();
            }
        }
        throw new IllegalArgumentException("Not an array type " + type);
    }
1111662
protected String xlate (String bundle, String message)
    {
        if (bundle != null && _ctx.getMessageManager() != null) {
            MessageBundle msgb = _ctx.getMessageManager().getBundle(bundle);
            if (msgb == null) {
                log.warning("No message bundle available to translate message", "bundle", bundle,
                            "message", message);
            } else {
                message = msgb.xlate(message);
            }
        }
        return message;
    }
608629
public String convert(String type) {
		if (isImplicitSarlTypes() && type.startsWith(IMPLICIT_PACKAGE)) {
			return type;
		}
		if (this.mapping == null) {
			this.mapping = initMapping();
		}
		final String map = this.mapping.get(type);
		if (map != null) {
			if (map.isEmpty() && !isImplicitJvmTypes()) {
				return null;
			}
			return map;
		}
		if (isImplicitJvmTypes()) {
			return type;
		}
		return null;
	}
182761
private ResourceBundle getBundle() {
        String bundleKey = getBundleKey();
        if (bundles.containsKey(bundleKey)) {
            return bundles.get(bundleKey);
        } else {
            ResourceBundle bundle = loadBundle();
            bundles.put(bundleKey, bundle);
            return bundle;
        }
    }
1075321
protected final String getPackageMessage(String packageName, String key) {
    Option<TextBundle> bundle = registry.load(locale, packageName + ".package");
    return bundle.isDefined() ? bundle.get().getText(key) : null;
  }
1007728
public static DynamicMessage getDefaultInstance(final Descriptor type) {
    return wrap(com.google.protobuf.DynamicMessage.getDefaultInstance(type));
  }
213341
public static String getMessageString(String msgKey) {

        assert (msgKey != null);

        try {

            return bundle.getString(msgKey);

        } catch (MissingResourceException mre) {
            throw new CompilerError(mre.getLocalizedMessage());
        } catch (ClassCastException cce) {
            throw new CompilerError("bundle contains non-string object for key '" + msgKey + "'");
        }
    }
995995
public ResourceBundle getBundle(final String bundleName) {
		LOG.info("Getting bundle: " + bundleName);
		return bundles.get(bundleName);
	}
829439
public static MessageSource of(final Class... types) {
    checkNotNull(types);
    checkArgument(types.length > 0);
    return new ResourceBundleMessageSource().add(false, types);
  }
946992
public Serializer getDefaultSerializer (Class type) {
		if (type == null) throw new IllegalArgumentException("type cannot be null.");

		Serializer serializerForAnnotation = getDefaultSerializerForAnnotatedType(type);
		if (serializerForAnnotation != null) return serializerForAnnotation;

		for (int i = 0, n = defaultSerializers.size(); i < n; i++) {
			DefaultSerializerEntry entry = defaultSerializers.get(i);
			if (entry.type.isAssignableFrom(type) && entry.serializerFactory.isSupported(type))
				return entry.serializerFactory.newSerializer(this, type);
		}

		return newDefaultSerializer(type);
	}
767484
public <T> T getBodyJson(java.lang.reflect.Type type) {
        String str = array.toString(StandardCharsets.UTF_8);
        if (str == null || str.isEmpty()) return null;
        return context.getJsonConvert().convertFrom(type, str);
    }
925772
int getResponseCodeFromBundle(Bundle b) {
        Object o = b.get(RESPONSE_CODE);
        if (o == null) {
            logDebug("Bundle with null response code, assuming OK (known issue)");
            return BILLING_RESPONSE_RESULT_OK;
        }
        else if (o instanceof Integer) return ((Integer)o).intValue();
        else if (o instanceof Long) return (int)((Long)o).longValue();
        else {
            logError("Unexpected type for bundle response code.");
            logError(o.getClass().getName());
            throw new RuntimeException("Unexpected type for bundle response code: " + o.getClass().getName());
        }
    }
300499
public static Type getTypeArgument(Type type) {
        if (!(type instanceof ParameterizedType)) {
            return null;
        }
        return ((ParameterizedType) type).getActualTypeArguments()[0];
    }
158231
@SuppressWarnings("unchecked")
   public <T> T getComponent(Class<T> type) {
      String className = type.getName();
      return (T) getComponent(type, className);
   }