Returns the type to import for {@code type}.
166178
private @Nullable ProtoType importedType(ProtoType type) {
    // Map key type is always scalar.
    if (type.isMap()) type = type.valueType();
    return type.isScalar() ? null : type;
  }
90203
public java.util.List<Type> getType() {  
		if (myType == null) {
			myType = new java.util.ArrayList<Type>();
		}
		return myType;
	}
806569
public Type unboxedTypeOrType(Type t) {
        Type unboxedType = unboxedType(t);
        return unboxedType.hasTag(NONE) ? t : unboxedType;
    }
854627
@Override
	public JvmType getType() {
		if (this.type == null) {
//			// make sure scoping has taken place and installed an IJvmTypeProvider
//			if (returnType != null)
//				returnType.getType();
			JvmType newType = TypesFactory.eINSTANCE.createJvmVoid();
			((InternalEObject)newType).eSetProxyURI(computeTypeUri(isProcedure()));
			type = (JvmType) eResolveProxy((InternalEObject) newType);
		}
		return super.getType();
	}
816037
public Class<?> getWrapperType(Class<?> primitiveType) {
        for(PrimitiveEnum p : PrimitiveEnum.values()) {
            if(p.getType().equals(primitiveType)) {
                return p.getClazz();
            }
        }

        return primitiveType; // if not primitive, return it as is
    }
985487
public <T extends Descriptor> T getDescriptorByType(Class<T> type) {
        for( Descriptor d : getExtensionList(Descriptor.class) )
            if(d.getClass()==type)
                return type.cast(d);
        return null;
    }
1276898
public static Class getTypeClass(Type type)
    {
        Class typeClassClass = null;

        if (type instanceof Class) {
            typeClassClass = (Class) type;
        } else if (type instanceof ParameterizedType) {
            typeClassClass = (Class) ((ParameterizedType) type).getRawType();
        } else if (type instanceof GenericArrayType) {
            Class<?> arrrayParameter = getTypeClass(((GenericArrayType) type).getGenericComponentType());
            if (arrrayParameter != null) {
                typeClassClass = Array.newInstance(arrrayParameter, 0).getClass();
            }
        }

        return typeClassClass;
    }
1065373
private String classForType(Type type) {

        switch (type) {
            case ERROR:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationError();
            case NORMAL:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationNormal();
            case WARNING:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationWarning();
            default:
                return I_CmsLayoutBundle.INSTANCE.notificationCss().notificationNormal();
        }
    }
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;
	}
1186123
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(Class<? extends Annotation> type) {
        return annotationType(TypeDescription.ForLoadedType.of(type));
    }
525224
@Override
  public final JSType getTypeOfThis() {
    return typeOfThis.isEmptyType()
        ? registry.getNativeObjectType(JSTypeNative.UNKNOWN_TYPE)
        : typeOfThis;
  }
1059929
public static Class<?> getRawType(Type type) {
		if (type instanceof Class) {
			return (Class<?>) type;
		} else if (type instanceof ParameterizedType) {
			ParameterizedType actualType = (ParameterizedType) type;
			return getRawType(actualType.getRawType());
		} else if (type instanceof GenericArrayType) {
			GenericArrayType genericArrayType = (GenericArrayType) type;
			Object rawArrayType = Array.newInstance(getRawType(genericArrayType
					.getGenericComponentType()), 0);
			return rawArrayType.getClass();
		} else if (type instanceof WildcardType) {
			WildcardType castedType = (WildcardType) type;
			return getRawType(castedType.getUpperBounds()[0]);
		} else {
			throw new IllegalArgumentException(
					"Type \'"
							+ type
							+ "\' is not a Class, "
							+ "ParameterizedType, or GenericArrayType. Can't extract class.");
		}
	}
959057
def get_type(self):
        
        if self.type_idx_value == None:
            self.type_idx_value = self.CM.get_type(self.type_idx)

        return self.type_idx_value
478391
public static Type findComponent(Class<?> type) {
        int i;
        Type cmp;

        for (i = 0; i < Type.PRIMITIVES.length; i++) {
            cmp = Type.PRIMITIVES[i];
            if (type == cmp.type) {
                return cmp;
            }
        }
        return Type.REFERENCE;
    }
258768
@Memoized
  public Type type() {
    int dotIndex = identifier().indexOf('.');
    if (dotIndex == 0) {
      checkArgument(BaseUtils.isIdentifierWithLeadingDot(identifier()));
      return Type.DOT_IDENT;
    } else {
      checkArgument(BaseUtils.isDottedIdentifier(identifier()));
      return dotIndex == -1 ? Type.SINGLE_IDENT : Type.DOTTED_IDENT;
    }
  }
5497
public static Type getType() {
        String osName = System.getProperty("os.name").toLowerCase();

        if (osName.contains("windows")) {
            return Type.WINDOWS;
        } else if (osName.contains("linux")) {
            return Type.LINUX;
        } else if (osName.contains("mac")) {
            return Type.MAC;
        }

        return Type.UNKNOWN;
    }
348210
protected IndexType getIndexType(String type)
    {
        type = type.toLowerCase();
        if ("keys".equals(type))
            return IndexType.KEYS;
        else if("custom".equals(type))
            return IndexType.CUSTOM;
        else if("composites".equals(type))
            return IndexType.COMPOSITES;
        else
            return null;
    }