public TypeMirror boxType(TypeMirror type) { return ElementUtils.boxType(getContext(), type); }
public TypeMirror boxType(TypeMirror type) { return ElementUtils.boxType(getContext(), type); }
private List<SpecializationData> filterImplementedSpecializations(ExecutableTypeData executable, List<SpecializationData> specializations) { List<SpecializationData> filteredSpecializations = new ArrayList<>(); TypeMirror returnType = ElementUtils.boxType(context, executable.getReturnType()); for (SpecializationData specialization : specializations) { TypeMirror specializationReturnType = ElementUtils.boxType(context, specialization.getReturnType().getType()); if (ElementUtils.typeEquals(specializationReturnType, returnType)) { filteredSpecializations.add(specialization); } } return filteredSpecializations; }
public static CodeTree check(TypeSystemData typeSystem, TypeMirror type, CodeTree content) { if (ElementUtils.isObject(type)) { return content; } CodeTreeBuilder builder = CodeTreeBuilder.createBuilder(); TypeCheckData check = typeSystem.getCheck(type); if (check == null) { builder.instanceOf(content, ElementUtils.boxType(typeSystem.getContext(), type)); } else { builder.startStaticCall(typeSystem.getTemplateType().asType(), check.getMethodName()).tree(content).end(); } return builder.build(); }
static CodeTree check(TypeSystemData typeSystem, TypeMirror type, CodeTree content) { if (ElementUtils.isObject(type)) { return content; } CodeTreeBuilder builder = CodeTreeBuilder.createBuilder(); TypeCheckData check = typeSystem.getCheck(type); if (check == null) { builder.instanceOf(content, ElementUtils.boxType(typeSystem.getContext(), type)); } else { builder.startStaticCall(typeSystem.getTemplateType().asType(), check.getMethodName()).tree(content).end(); } return builder.build(); }
builder.type(ElementUtils.boxType(context, param.asType())); if (!param.asType().getKind().isPrimitive()) { builder.string(")");
builder.type(ElementUtils.eraseGenericTypes(ElementUtils.boxType(context, param.asType()))); if (!param.asType().getKind().isPrimitive()) { builder.string(")");