javax.lang.model.type.ArrayType Java Examples

The following examples show how to use javax.lang.model.type.ArrayType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: PluginGenerator.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void appendSimpleTypeName(StringBuilder ret, TypeMirror type) {
    switch (type.getKind()) {
        case DECLARED:
            DeclaredType declared = (DeclaredType) type;
            TypeElement element = (TypeElement) declared.asElement();
            ret.append(element.getSimpleName());
            break;
        case TYPEVAR:
            appendSimpleTypeName(ret, ((TypeVariable) type).getUpperBound());
            break;
        case WILDCARD:
            appendSimpleTypeName(ret, ((WildcardType) type).getExtendsBound());
            break;
        case ARRAY:
            appendSimpleTypeName(ret, ((ArrayType) type).getComponentType());
            ret.append("Array");
            break;
        default:
            ret.append(type);
    }
}
 
Example #2
Source Project: quarkus   Author: quarkusio   File: ConfigDoItemFinder.java    License: Apache License 2.0 6 votes vote down vote up
private String simpleTypeToString(TypeMirror typeMirror) {
    if (typeMirror.getKind().isPrimitive()) {
        return typeMirror.toString();
    } else if (typeMirror.getKind() == TypeKind.ARRAY) {
        return simpleTypeToString(((ArrayType) typeMirror).getComponentType());
    }

    final String knownGenericType = getKnownGenericType((DeclaredType) typeMirror);

    if (knownGenericType != null) {
        return knownGenericType;
    }

    List<? extends TypeMirror> typeArguments = ((DeclaredType) typeMirror).getTypeArguments();
    if (!typeArguments.isEmpty()) {
        return simpleTypeToString(typeArguments.get(0));
    }

    return typeMirror.toString();
}
 
Example #3
Source Project: bazel   Author: bazelbuild   File: Marshallers.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void addDeserializationCode(Context context)
    throws SerializationProcessingFailedException {
  Context repeated =
      context.with(
          ((ArrayType) context.type).getComponentType(), context.makeName("repeated"));
  String lengthName = context.makeName("length");
  context.builder.addStatement("int $L = codedIn.readInt32()", lengthName);

  String resultName = context.makeName("result");
  context.builder.addStatement(
      "$T[] $L = new $T[$L]",
      repeated.getTypeName(),
      resultName,
      repeated.getTypeName(),
      lengthName);
  String indexName = context.makeName("i");
  context.builder.beginControlFlow(
      "for (int $L = 0; $L < $L; ++$L)", indexName, indexName, lengthName, indexName);
  writeDeserializationCode(repeated);
  context.builder.addStatement("$L[$L] = $L", resultName, indexName, repeated.name);
  context.builder.endControlFlow();
  context.builder.addStatement("$L = $L", context.name, resultName);
}
 
Example #4
Source Project: netbeans   Author: apache   File: Constructor.java    License: Apache License 2.0 6 votes vote down vote up
private TypeDeclaration typeToTypeDeclaration(TypeMirror tMirror){
    int dimension = 0;
    TypeMirror aType =  tMirror;
    ITypeDeclaration[] generics = null;
    if(tMirror.getKind() == TypeKind.ARRAY){
        for(;aType.getKind() == TypeKind.ARRAY; aType =  ((ArrayType)tMirror).getComponentType()) {
            dimension++;
        }
    }
    if(aType.getKind() == TypeKind.DECLARED){
        DeclaredType dType = (DeclaredType) aType;
        List<? extends TypeMirror> parameters = dType.getTypeArguments();
        if( parameters!=null && parameters.size()>0){
            generics = new ITypeDeclaration[parameters.size()];
            int i=0;
            for(TypeMirror gType: parameters){
                generics[i] = typeToTypeDeclaration(gType);
                i++;
            }
        }
    }
    return new TypeDeclaration(owner, generics, dimension);
}
 
Example #5
Source Project: sqlitemagic   Author: SiimKinks   File: Environment.java    License: Apache License 2.0 6 votes vote down vote up
public ExtendedTypeElement getSupportedSerializedTypeElement(TypeMirror typeMirror) {
  boolean isArrayElement = false;
  boolean isGenericElement = false;
  Dual<TypeElement, Boolean> typeElement = getTypeElement(typeMirror);
  if (typeElement == null) {
    if (typeMirror instanceof ArrayType) {
      ArrayType arrayType = (ArrayType) typeMirror;
      final TypeMirror arrayComponentType = arrayType.getComponentType();
      if (typeUtils.isSameType(arrayComponentType, Const.BYTE_TYPE)) {
        typeElement = getTypeElement(arrayComponentType);
        isArrayElement = true;
      } else {
        return ExtendedTypeElement.EMPTY;
      }
    } else {
      typeElement = Dual.create(getGenericTypeElement(typeMirror), false);
      isGenericElement = true;
    }
  }
  return new ExtendedTypeElement(typeElement, typeMirror, isArrayElement, isGenericElement);
}
 
Example #6
Source Project: auto   Author: google   File: MoreTypes.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Integer visitArray(ArrayType t, Set<Element> visiting) {
  int result = hashKind(HASH_SEED, t);
  result *= HASH_MULTIPLIER;
  result += t.getComponentType().accept(this, visiting);
  return result;
}
 
Example #7
Source Project: netbeans   Author: apache   File: TypeProductionFilter.java    License: Apache License 2.0 5 votes vote down vote up
private boolean checkArrayBeanType(TypeMirror productionType,
        TypeMirror arrayComponentType)
{
    if ( productionType == null ){
        return false;
    }
    if ( productionType.getKind() != TypeKind.ARRAY ){
        return false;
    }
    return getImplementation().getHelper().getCompilationController().
            getTypes().isSameType( arrayComponentType,
                    ((ArrayType) productionType).getComponentType());
}
 
Example #8
Source Project: TencentKona-8   Author: Tencent   File: TypeMonikerFactory.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static TypeMoniker getTypeMoniker(TypeMirror typeMirror) {
    if (typeMirror == null)
        throw new NullPointerException();

    if (typeMirror.getKind().isPrimitive())
        return new PrimitiveTypeMoniker((PrimitiveType) typeMirror);
    else if (typeMirror.getKind().equals(TypeKind.ARRAY))
        return new ArrayTypeMoniker((ArrayType) typeMirror);
    else if (typeMirror.getKind().equals(TypeKind.DECLARED))
        return new DeclaredTypeMoniker((DeclaredType) typeMirror);
    return getTypeMoniker(typeMirror.toString());
}
 
Example #9
Source Project: auto   Author: google   File: TypeEncoder.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc} The result respects the Java syntax, whereby {@code Foo @Bar []} is an
 * annotation on the array type itself, while {@code @Bar Foo[]} would be an annotation on the
 * component type.
 */
@Override
public StringBuilder visitArray(ArrayType type, StringBuilder sb) {
  visit2(type.getComponentType(), sb);
  List<? extends AnnotationMirror> annotationMirrors = type.getAnnotationMirrors();
  if (!annotationMirrors.isEmpty()) {
    sb.append(" ");
    appendAnnotationsWithExclusions(annotationMirrors, sb);
  }
  return sb.append("[]");
}
 
Example #10
Source Project: featured   Author: beworker   File: Names.java    License: Apache License 2.0 5 votes vote down vote up
public TypeName getTypeNameByKind(VariableElement param) {
    switch (param.asType().getKind()) {

        case BOOLEAN:
            return TypeName.BOOLEAN;
        case BYTE:
            return TypeName.BYTE;
        case CHAR:
            return TypeName.CHAR;
        case DOUBLE:
            return TypeName.DOUBLE;
        case FLOAT:
            return TypeName.FLOAT;
        case INT:
            return TypeName.INT;
        case LONG:
            return TypeName.LONG;
        case SHORT:
            return TypeName.SHORT;

        case DECLARED:
            TypeMirror type = param.asType();
            TypeName typeName = ClassName.get(type);
            typeName = applyAnnotations(typeName, param);
            return typeName;

        case ARRAY:
            ArrayType arrayType = (ArrayType) param.asType();
            TypeName arrayTypeName = ArrayTypeName.get(arrayType);
            arrayTypeName = applyAnnotations(arrayTypeName, param);
            return arrayTypeName;

        default:
            throw new IllegalStateException("unsupported kind: " + param.asType().getKind());
    }
}
 
Example #11
Source Project: j2objc   Author: google   File: TypeUtil.java    License: Apache License 2.0 5 votes vote down vote up
public ArrayType getArrayType(TypeMirror componentType, int dims) {
  if (dims < 1) {
    throw new IllegalArgumentException("dims must be greater than or equal to 1");
  }
  if (dims == 1) {
    return getArrayType(componentType);
  } else {
    return getArrayType(getArrayType(componentType), dims - 1);
  }
}
 
Example #12
Source Project: netbeans   Author: apache   File: ElementUtilitiesEx.java    License: Apache License 2.0 5 votes vote down vote up
private static String getRealTypeName(TypeMirror type, CompilationInfo ci) {
    final TypeMirror et = ci.getTypes().erasure(type);
    if (et.getKind() == TypeKind.DECLARED) {
        return ElementUtilities.getBinaryName((TypeElement)((DeclaredType)et).asElement());
    }
    if (et.getKind() == TypeKind.ARRAY) {
        return getRealTypeName(((ArrayType)et).getComponentType(), ci) + "[]";  // NOI18N
    }
    return et.toString();
}
 
Example #13
Source Project: jdk8u60   Author: chenghanpeng   File: ApNavigator.java    License: GNU General Public License v2.0 5 votes vote down vote up
public boolean isArrayButNotByteArray(TypeMirror t) {
    if(!isArray(t))
        return false;

    ArrayType at = (ArrayType) t;
    TypeMirror ct = at.getComponentType();

    return !ct.equals(primitiveByte);
}
 
Example #14
Source Project: buck   Author: facebook   File: TypeResolverTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testMultiDimArrayTypeResolves() throws IOException {
  compile("abstract class Foo extends java.util.ArrayList<java.lang.String[][]> { }");

  TypeElement fooElement = elements.getTypeElement("Foo");
  TypeElement listElement = elements.getTypeElement("java.util.ArrayList");
  TypeMirror stringType = elements.getTypeElement("java.lang.String").asType();
  ArrayType stringArrayType = types.getArrayType(stringType);
  ArrayType stringArrayArrayType = types.getArrayType(stringArrayType);

  DeclaredType expectedSuperclass = types.getDeclaredType(listElement, stringArrayArrayType);

  assertSameType(expectedSuperclass, fooElement.getSuperclass());
}
 
Example #15
Source Project: buck   Author: facebook   File: TypeResolverTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testPrimitiveArrayTypeResolves() throws IOException {
  compile("abstract class Foo extends java.util.ArrayList<int[]> { }");

  TypeElement fooElement = elements.getTypeElement("Foo");
  TypeElement listElement = elements.getTypeElement("java.util.ArrayList");
  TypeMirror intType = types.getPrimitiveType(TypeKind.INT);
  ArrayType intArrayType = types.getArrayType(intType);

  DeclaredType expectedSuperclass = types.getDeclaredType(listElement, intArrayType);

  assertSameType(expectedSuperclass, fooElement.getSuperclass());
}
 
Example #16
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ApNavigator.java    License: GNU General Public License v2.0 5 votes vote down vote up
public TypeMirror getComponentType(TypeMirror t) {
    if (isArray(t)) {
        ArrayType at = (ArrayType) t;
        return at.getComponentType();
    }

    throw new IllegalArgumentException();
}
 
Example #17
Source Project: netbeans   Author: apache   File: FxClassUtils.java    License: Apache License 2.0 5 votes vote down vote up
public static boolean isSimpleType(TypeMirror t, CompilationInfo ci) {
    if (isPrimitive(t)) {
        return true;
    }
    if (t.getKind() == TypeKind.DECLARED) {
        TypeElement tel = (TypeElement)ci.getTypes().asElement(t);
        if (findValueOf(tel, ci) != null) {
            return true;
        }

        // special hack, see BeanAdapter - Color and Paint class can be written as primitives:
        String qn = tel.getQualifiedName().toString();
        if (FX_COLOR_CLASS.equals(qn) || FX_PAINT_CLASS.equals(qn) || JL_STRING_CLASS.equals(qn)) {
            return true;
        }
    }
    
    // arrays
    if (t.getKind() == TypeKind.ARRAY) {
        TypeMirror component = ((ArrayType)t).getComponentType();
        if (component.getKind() == TypeKind.ARRAY) {
            // no support for 2-dim arrays
            return false;
        }
        return isSimpleType(component, ci);
    }
    return false;
}
 
Example #18
Source Project: j2objc   Author: google   File: MetadataWriter.java    License: Apache License 2.0 5 votes vote down vote up
private Expression createContainerAnnotation(List<Annotation> annotations) {
  DeclaredType annotationType = annotations.get(0).getAnnotationMirror().getAnnotationType();
  ArrayType arrayType = typeUtil.getArrayType(annotationType);
  DeclaredType containerType = (DeclaredType) ElementUtil.getAnnotationValue(
      ElementUtil.getAnnotation(annotationType.asElement(), Repeatable.class), "value");
  TypeElement containerElement = (TypeElement) containerType.asElement();
  FunctionElement element = new FunctionElement(
      "create_" + nameTable.getFullName(containerElement), containerType, containerElement);
  FunctionInvocation invocation = new FunctionInvocation(element, containerType);
  element.addParameters(arrayType);
  List<Expression> array = annotations.stream().map(Annotation::getAnnotationMirror)
      .map(translationUtil::createAnnotation).collect(Collectors.toList());
  invocation.addArgument(translationUtil.createObjectArray(array, arrayType));
  return invocation;
}
 
Example #19
Source Project: netbeans   Author: apache   File: JavaWsdlMapper.java    License: Apache License 2.0 5 votes vote down vote up
static String getTypeName(CompilationController controller, TypeMirror typeMirror) {
    TypeKind typeKind = typeMirror.getKind();
    switch (typeKind) {
        case BOOLEAN : return "boolean"; // NOI18N
        case BYTE : return "byte"; // NOI18N
        case CHAR : return "char"; // NOI18N
        case DOUBLE : return "double"; // NOI18N
        case FLOAT : return "float"; // NOI18N
        case INT : return "int"; // NOI18N
        case LONG : return "long"; // NOI18N
        case SHORT : return "short"; // NOI18N
        case VOID : return "void"; // NOI18N
        case ERROR :
        case DECLARED :
            if ( typeMirror instanceof DeclaredType ){
                Element element = controller.getTypes().asElement(typeMirror);
                return ((TypeElement) element).getSimpleName().toString();
            }
            else {
                break;
            }
        case ARRAY : 
            ArrayType arrayType = (ArrayType) typeMirror;
            Element componentTypeElement = controller.getTypes().asElement(arrayType.getComponentType());
            return ((TypeElement) componentTypeElement).getSimpleName().toString() + "[]";
        case EXECUTABLE :
        case NONE :
        case NULL :
        case OTHER :
        case PACKAGE :
        case TYPEVAR :
        case WILDCARD :
        default:break;
    }
    return null;
}
 
Example #20
Source Project: auto   Author: google   File: MoreTypes.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Boolean visitArray(ArrayType a, EqualVisitorParam p) {
  if (p.type.getKind().equals(ARRAY)) {
    ArrayType b = (ArrayType) p.type;
    return equal(a.getComponentType(), b.getComponentType(), p.visiting);
  }
  return false;
}
 
Example #21
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ApNavigator.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
public TypeMirror visitArray(ArrayType t, TypeElement typeElement) {
    // we are checking if t=T[] is assignable to sup.
    // the only case this is allowed is sup=Object,
    // and Object isn't parameterized.
    return null;
}
 
Example #22
Source Project: cronet   Author: lizhangqu   File: JniProcessor.java    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
TypeName toTypeName(TypeMirror t, boolean useJni) {
    if (t.getKind() == TypeKind.ARRAY) {
        return ArrayTypeName.of(toTypeName(((ArrayType) t).getComponentType(), useJni));
    }
    TypeName typeName = TypeName.get(t);
    if (useJni && shouldDowncastToObjectForJni(typeName)) {
        return TypeName.OBJECT;
    }
    return typeName;
}
 
Example #23
Source Project: j2objc   Author: google   File: ArrayRewriter.java    License: Apache License 2.0 5 votes vote down vote up
private MethodInvocation newMultiDimensionArrayInvocation(
    ArrayType arrayType, List<Expression> dimensions, boolean retainedResult) {
  assert dimensions.size() > 1;
  TypeMirror componentType = arrayType;
  for (int i = 0; i < dimensions.size(); i++) {
    assert TypeUtil.isArray(componentType);
    componentType = ((ArrayType) componentType).getComponentType();
  }
  TypeElement iosArrayElement = typeUtil.getIosArray(componentType);

  ExecutableElement methodElement =
      getMultiDimensionMethod(componentType, iosArrayElement, retainedResult);
  MethodInvocation invocation = new MethodInvocation(
      new ExecutablePair(methodElement), arrayType, new SimpleName(iosArrayElement));

  // Add the dimension count argument.
  invocation.addArgument(NumberLiteral.newIntLiteral(dimensions.size(), typeUtil));

  // Create the dimensions array.
  ArrayInitializer dimensionsArg = new ArrayInitializer(typeUtil.getArrayType(typeUtil.getInt()));
  for (Expression e : dimensions) {
    dimensionsArg.addExpression(e.copy());
  }
  invocation.addArgument(dimensionsArg);

  if (!componentType.getKind().isPrimitive()) {
    invocation.addArgument(new TypeLiteral(componentType, typeUtil));
  }

  return invocation;
}
 
Example #24
Source Project: doma   Author: domaframework   File: QueryReturnMeta.java    License: Apache License 2.0 5 votes vote down vote up
public boolean isPrimitiveIntArray() {
  return ctType
      .getType()
      .accept(
          new TypeKindVisitor8<Boolean, Void>(false) {

            @Override
            public Boolean visitArray(ArrayType t, Void p) {
              return t.getComponentType().getKind() == TypeKind.INT;
            }
          },
          null);
}
 
Example #25
Source Project: netbeans   Author: apache   File: ElementNode.java    License: Apache License 2.0 5 votes vote down vote up
private static String createHtmlHeader(boolean deprecated, ExecutableElement e) {
    StringBuilder sb = new StringBuilder();
    sb.append("<html>");
    if (deprecated) sb.append("<s>");
    if (e.getKind() == ElementKind.CONSTRUCTOR) {
        sb.append(e.getEnclosingElement().getSimpleName());
    } else {
        sb.append(e.getSimpleName());
    }
    if (deprecated) sb.append("</s>");
    sb.append("("); // NOI18N
    for(Iterator<? extends VariableElement> it = e.getParameters().iterator(); it.hasNext(); ) {
        VariableElement param = it.next();
        if (!it.hasNext() && e.isVarArgs() && param.asType().getKind() == TypeKind.ARRAY) {
            sb.append(translateToHTML(print(((ArrayType) param.asType()).getComponentType())));
            sb.append("...");
        } else {
            sb.append(translateToHTML(print(param.asType())));
        }
        sb.append(" "); // NOI18N
        sb.append(param.getSimpleName());
        if (it.hasNext()) {
            sb.append(", "); // NOI18N
        }
    }
    sb.append(")"); // NOI18N
    if ( e.getKind() != ElementKind.CONSTRUCTOR ) {
        TypeMirror rt = e.getReturnType();
        if ( rt.getKind() != TypeKind.VOID ) {
            sb.append(" : "); // NOI18N
            sb.append(translateToHTML(print(e.getReturnType())));
        }
    }
    return sb.toString();
}
 
Example #26
Source Project: netbeans   Author: apache   File: JavadocHelper.java    License: Apache License 2.0 5 votes vote down vote up
private static void appendType(FragmentBuilder fb, TypeMirror type, boolean varArg) {
    switch (type.getKind()) {
    case ARRAY:
        appendType(fb, ((ArrayType) type).getComponentType(), false);
        fb.append(varArg ? "..." : "[]"); // NOI18N
        break;
    case DECLARED:
        fb.append(((TypeElement) ((DeclaredType) type).asElement()).getQualifiedName());
        break;
    default:
        fb.append(type.toString());
    }
}
 
Example #27
Source Project: easybundler   Author: google   File: Bundler.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * See {@link #matchesArrayClass(VariableElement, Class, MatchPolicy)}.
 */
private boolean matchesArrayClass(VariableElement field, String className, MatchPolicy policy) {
    // Check if the field is an array
    if (field.asType().getKind() != TypeKind.ARRAY) {
        return false;
    }

    // Get the type of array it is
    TypeMirror componentType = ((ArrayType) field.asType()).getComponentType();

    // Perform check
    TypeElement target = getTypeElementForClass(className);
    return target != null && typesMatch(componentType, target.asType(), policy);
}
 
Example #28
Source Project: auto-parcel   Author: aitorvs   File: MoreTypes.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Integer visitArray(ArrayType t, Set<Element> visiting) {
    int result = hashKind(HASH_SEED, t);
    result *= HASH_MULTIPLIER;
    result += t.getComponentType().accept(this, visiting);
    return result;
}
 
Example #29
Source Project: j2objc   Author: google   File: ArrayRewriter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void endVisit(InstanceofExpression node) {
  TypeMirror type = node.getRightOperand().getTypeMirror();
  if (!TypeUtil.isArray(type) || ((ArrayType) type).getComponentType().getKind().isPrimitive()) {
    return;
  }
  GeneratedExecutableElement element = GeneratedExecutableElement.newMethodWithSelector(
      "isInstance", typeUtil.getBoolean(), TypeUtil.IOS_CLASS);
  element.addParameter(
      GeneratedVariableElement.newParameter("object", TypeUtil.ID_TYPE, element));
  MethodInvocation invocation =
      new MethodInvocation(new ExecutablePair(element), new TypeLiteral(type, typeUtil));
  invocation.addArgument(TreeUtil.remove(node.getLeftOperand()));
  node.replaceWith(invocation);
}
 
Example #30
Source Project: netbeans   Author: apache   File: CreateElementUtilities.java    License: Apache License 2.0 5 votes vote down vote up
/**
 *
 * @param info context {@link CompilationInfo}
 * @param iterable tested {@link TreePath}
 * @return generic type of an {@link Iterable} or {@link ArrayType} at a TreePath
 */
public static TypeMirror getIterableGenericType(CompilationInfo info, TreePath iterable) {
    TypeElement iterableElement = info.getElements().getTypeElement("java.lang.Iterable"); //NOI18N
    if (iterableElement == null) {
        return null;
    }
    TypeMirror iterableType = info.getTrees().getTypeMirror(iterable);
    if (iterableType == null) {
        return null;
    }
    TypeMirror designedType = null;
    if (iterableType.getKind() == TypeKind.DECLARED) {
        DeclaredType declaredType = (DeclaredType) iterableType;
        if (!info.getTypes().isSubtype(info.getTypes().erasure(declaredType), info.getTypes().erasure(iterableElement.asType()))) {
            return null;
        }
        ExecutableElement iteratorMethod = (ExecutableElement) iterableElement.getEnclosedElements().get(0);
        ExecutableType iteratorMethodType = (ExecutableType) info.getTypes().asMemberOf(declaredType, iteratorMethod);
        List<? extends TypeMirror> typeArguments = ((DeclaredType) iteratorMethodType.getReturnType()).getTypeArguments();
        if (!typeArguments.isEmpty()) {
            designedType = typeArguments.get(0);
        } else {
            TypeElement jlObject = info.getElements().getTypeElement("java.lang.Object");

            if (jlObject != null) {
                designedType = jlObject.asType();
            }
        }
    } else if (iterableType.getKind() == TypeKind.ARRAY) {
        designedType = ((ArrayType) iterableType).getComponentType();
    }
    if (designedType == null) {
        return null;
    }
    return JavaPluginUtils.resolveCapturedType(info, designedType);
}