Get a Roboto typeface for a given string type

@param ctx       the application context
@param type      the typeface type argument
@return          the loaded typeface, or null
493873
public static Typeface getTypeface(Context ctx, Face type){
        return getTypeface(ctx, "fonts/" + type.getFontFileName());
    }
51442
protected BindingTemplate loadBindingTemplate(String type) {
        try (final InputStream is = AddMojo.class.getResourceAsStream("/bindings.json")) {
            final String bindingsJsonStr = IOUtil.toString(is);
            final BindingsTemplate bindingsTemplate = new ObjectMapper()
                .readValue(bindingsJsonStr, BindingsTemplate.class);
            return bindingsTemplate.getBindingTemplateByName(type);
        } catch (IOException e) {
            warning(LOAD_BINDING_TEMPLATES_FAIL);
            // Add mojo could work without Binding Template, just return null if binding load fail
            return null;
        }
    }
392246
private void setCustomTypeface(Context context, AttributeSet attrs) {
        DEFAULT_TYPEFACE = TypefaceType.getDefaultTypeface(context);

        //Typeface.createFromAsset doesn't work in the layout editor. Skipping...
        if (isInEditMode() || attrs == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
            return;
        }

        TypedArray styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.TypefaceView);
        Integer fontInt = styledAttrs.getInt(R.styleable.TypefaceView_tv_typeface, DEFAULT_TYPEFACE);
        styledAttrs.recycle();

        mCurrentTypeface = TypefaceType.getTypeface(fontInt);
        Typeface typeface = getFont(context, mCurrentTypeface.getAssetFileName());
        setTypeface(typeface);
    }
1371544
@SuppressWarnings("unchecked")
    public <T> FieldFormatter<T> getFormatter(final Class<T> requiredType) {
        return (FieldFormatter<T>)typeMap.get(requiredType);
    }
1052710
protected synchronized HierarchicalType getDataType(String type) {
        HierarchicalType dataType = typeInstances.get(type);
        //todo: are there still cases where type can be null?
        if (dataType == null) {
            dataType = createDataType(type);
            typeInstances.put(type, dataType);
        }
        return dataType;
    }
802540
public static String getElementAsString(JDeclaration type) {
		StringBuilder builder = new StringBuilder();
		JFormatter jFormatter = new JFormatter(new StringBuilderWriter(builder));
		type.declare(jFormatter);
		return builder.toString();
	}
1147558
@SuppressWarnings("AmbiguousMethodReference")
  public static FunctionType toMaybeFunctionType(JSType type) {
    return type == null ? null : type.toMaybeFunctionType();
  }
1101897
public com.google.javascript.jscomp.Requirement.Type getType() {
    com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_);
    return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result;
  }
669000
protected static String getInlineData(I_CmsFormatterBean formatter, String type) {

        if (TYPE_CSS.equals(type)) {
            return formatter.getInlineCss();
        } else if (TYPE_JAVASCRIPT.equals(type)) {
            return formatter.getInlineJavascript();
        }
        return null;
    }
281811
public static ContentType getInstance(String type)
    {
        if(type.equals(TEST.toString()))
        {
            return TEST;
        }
        else if(type.equals(REQUIREMENT.toString()))
        {
            return REQUIREMENT;
        }
        else if(type.equals(BOTH.toString()))
        {
            return BOTH;
        }

        return UNKNOWN;
    }
1196895
private static String getSmallTypeIconHTML(String type, boolean isPageOverlay) {

        CmsExplorerTypeSettings typeSettings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type);
        if ((typeSettings == null) && LOG.isWarnEnabled()) {
            LOG.warn("Could not read explorer type settings for " + type);
        }
        String result = null;
        String overlayClass = isPageOverlay ? "o-page-icon-overlay" : "o-icon-overlay";
        if (typeSettings != null) {
            if (typeSettings.getSmallIconStyle() != null) {
                result = "<span class=\"v-icon "
                    + overlayClass
                    + " "
                    + typeSettings.getSmallIconStyle()
                    + "\">&nbsp;</span>";
            } else if (typeSettings.getIcon() != null) {
                result = "<img src=\""
                    + CmsWorkplace.getResourceUri(CmsWorkplace.RES_PATH_FILETYPES + typeSettings.getIcon())
                    + "\" class=\""
                    + overlayClass
                    + "\" />";
            } else {
                result = "<span class=\"v-icon "
                    + overlayClass
                    + " "
                    + CmsExplorerTypeSettings.ICON_STYLE_DEFAULT_SMALL
                    + "\">&nbsp;</span>";
            }
        }
        return result;
    }
68372
public T typeface(Typeface tf) {

        if (view instanceof TextView) {
            TextView tv = (TextView) view;
            tv.setTypeface(tf);
        }
        return self();
    }
715358
public final void updateIcon(final IconType type) {
        if (type != null) updateIcon(Styles.FONT_AWESOME_BASE + " " + type.getCssName());
    }
473063
public AiTextureOp getTextureOp(AiTextureType type, int index) {
        checkTexRange(type, index);
        
        Property p = getProperty(PropertyKey.TEX_OP.m_key);
        
        if (null == p || null == p.getData()) {
            return (AiTextureOp) m_defaults.get(PropertyKey.TEX_OP);
        }
        
        return AiTextureOp.fromRawValue((Integer) p.getData());
    }
1125850
private FullTypeSignature getFullTypeSignature(Type type) {
		if (type instanceof Class<?>) {
			return getTypeSignature((Class<?>) type);
		}
		if (type instanceof GenericArrayType) {
			return getArrayTypeSignature((GenericArrayType) type);
		}
		if (type instanceof ParameterizedType) {
			return getClassTypeSignature((ParameterizedType) type);
		}
		return null;
	}
107806
public String getDefaultNamePattern(String type) {

        CmsExplorerTypeSettings settings = getExplorerTypeSetting(type);
        if ((settings != null) && (settings.getNamePattern() != null)) {
            return settings.getNamePattern();
        }
        if (type.equals("sitemap_config") || type.equals("module_config")) {
            return ".config%(number)";
        }
        if (type.equals("content_folder")) {
            return ".content%(number)";
        }
        return "new_" + type + "%(number)";
    }
124546
public String getCompressor(String type) {
        if (mCompressionMap == null) {
            return null;
        }

        return mCompressionMap.get(type).toString();
    }