DOCUMENT ME!

@param  type     DOCUMENT ME!
@param  isSorted DOCUMENT ME!

@return DOCUMENT ME!
972633
private FourColors getTableHeaderColors(CommonControlState type, boolean isSorted) {
        switch (type) {

        case DISABLED:
            return isSorted ? tableHeaderDisabledSorted : tableHeaderDisabled;

        case ENABLED:
            return isSorted ? tableHeaderSorted : tableHeaderEnabled;

        case PRESSED:
            return tableHeaderPressed;
        }

        return null;
    }
300499
public static Type getTypeArgument(Type type) {
        if (!(type instanceof ParameterizedType)) {
            return null;
        }
        return ((ParameterizedType) type).getActualTypeArguments()[0];
    }
441819
protected File getFileRoot(Class type) {
        String path = getGroupsRootPath() + type.getName();
        File f = new File(path);
        return (f.exists()) ? f : null;
    }
189867
public static boolean isOptional(final Type type) {
        if (OPTIONAL_CLASS == null) {
            return false;
        }

        if (!(type instanceof ParameterizedType)) {
            // Either this is no Optional, or it's a raw optional which is useless for us anyway...
            return false;
        }

        return OPTIONAL_CLASS.equals(((ParameterizedType) type).getRawType());
    }
71403
@Pure
	public static ShapeElementType toESRI(Class<? extends MapElement> type) {
		if (MapPolyline.class.isAssignableFrom(type)) {
			return ShapeElementType.POLYLINE;
		}
		if (MapPolygon.class.isAssignableFrom(type)) {
			return ShapeElementType.POLYGON;
		}
		if (MapMultiPoint.class.isAssignableFrom(type)) {
			return ShapeElementType.MULTIPOINT;
		}
		if (MapPoint.class.isAssignableFrom(type)) {
			return ShapeElementType.POINT;
		}
		throw new IllegalArgumentException();
	}
391164
public static Class<?> classFromAsmType(Type type) {
    Optional<Class<?>> maybeClass = objectTypeToClassCache.getUnchecked(type);
    if (!maybeClass.isPresent()) {
      throw new IllegalArgumentException("Could not load: " + type);
    }
    return maybeClass.get();
  }
1019269
public static Condition<?, ?> isType(final Class<?> type) {
    return new Condition<Object, Object>() {
      public boolean applies(MappingContext<Object, Object> context) {
        return type.isAssignableFrom(context.getSourceType());
      }
    };
  }
137170
public static Type typeFromString(String type) {
        final PrimitiveType primitive = PrimitiveType.fromName(type);
        if (primitive != null) {
            return primitive.getKeyClass();
        }
        try {
            return loadClassByName(type);
        } catch (Exception e) {
            //LOGGER.error(String.format("Failed to resolve '%s' into class", type), e);
        }
        return null;
    }
521316
public static final TypeCategory getTypeCategory(Type type) {
        if (type instanceof GenericObjectType) {
            return ((GenericObjectType) type).getTypeCategory();
        }

        if (type instanceof ObjectType || type instanceof NullType) {
            return TypeCategory.PLAIN_OBJECT_TYPE;
        }

        if (type instanceof ArrayType) {
            return TypeCategory.ARRAY_TYPE;
        }

        throw new IllegalArgumentException("Not a reference type: " + type);
    }
941647
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setType(final String type) {
        pathBuilder.setType(type);
        return (T) this;
    }
289483
public Type erasure(Types types) {
        if (erasure_field == null)
            erasure_field = types.erasure(type);
        return erasure_field;
    }
127267
protected void box(final Type type) {
        switch (type.getSort()) {
            case Type.BOOLEAN:
                visitMethodInsn(INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false);
                break;
            case Type.BYTE:
                visitMethodInsn(INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false);
                break;
            case Type.CHAR:
                visitMethodInsn(INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;", false);
                break;
            case Type.DOUBLE:
                visitMethodInsn(INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;", false);
                break;
            case Type.FLOAT:
                visitMethodInsn(INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;", false);
                break;
            case Type.INT:
                visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false);
                break;
            case Type.LONG:
                visitMethodInsn(INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;", false);
                break;
            case Type.SHORT:
                visitMethodInsn(INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;", false);
                break;
            case Type.ARRAY:
            case Type.OBJECT:
                break;
            default:
                break;
        }
    }
1117216
public static boolean isBasicType(String type){
		for(String basicType : basicTypeArray){
			if(basicType.equals(type)){
				return true;
			}
		}
		return false;
	}
521717
static boolean isBasicValueType(final Type type) {
        if (type instanceof Class<?>) {
            return isBasicValueType((Class<?>) type);
        } else if (type instanceof ParameterizedType) {
            return isBasicValueType(((ParameterizedType) type).getRawType());
        } else {
            return false;
        }
    }
729804
public static String getDescription(TypeDeclaration type) {
		if (type == null || type.description() == null) {
			return null;
		} else {
			return type.description().value();
		}
	}
463833
protected boolean appendDocumentType(StringBuilder sb, DocumentType type) {
        if (type == null) {
            return false;
        }
        sb.append("<!DOCTYPE ").append(type.getName());
        boolean hasNoPublicId = true;
        if (type.getPublicId() != null && type.getPublicId().length() > 0) {
            sb.append(" PUBLIC \"").append(type.getPublicId()).append('"');
            hasNoPublicId = false;
        }
        if (type.getSystemId() != null && type.getSystemId().length() > 0) {
            if (hasNoPublicId) {
                sb.append(" SYSTEM");
            }
            sb.append(" \"").append(type.getSystemId()).append("\"");
        }
        sb.append(">");
        return true;
    }
506627
public boolean hasConversion(String type) {
		if ((isImplicitSarlTypes() && type.startsWith(IMPLICIT_PACKAGE))
			|| isImplicitJvmTypes()) {
			return true;
		}
		if (this.mapping == null) {
			this.mapping = initMapping();
		}
		return this.mapping.containsKey(type);
	}