private static String getBindingKey(ArrayType type) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < type.dimensions(); i++) { sb.append('['); } sb.append(getGeneralTypeBindingKey(type.component())); return null; }
@Override public IJavaType component() { return wrap(getType().component()); }
return "[" + toString( ( (ArrayType) p ).component()); //$NON-NLS-1$
private Type searchTypePath(Type type, TypeAnnotationState typeAnnotationState) { PathElementStack elements = typeAnnotationState.pathElements; PathElement element = elements.pop(); if (element == null) { return type; } switch (element.kind) { case ARRAY: { ArrayType arrayType = type.asArrayType(); int dimensions = arrayType.dimensions(); while (--dimensions > 0 && elements.size() > 0 && elements.peek().kind == PathElement.Kind.ARRAY) { elements.pop(); } assert dimensions == 0; return searchTypePath(arrayType.component(), typeAnnotationState); } case PARAMETERIZED: { ParameterizedType parameterizedType = type.asParameterizedType(); return searchTypePath(parameterizedType.argumentsArray()[element.pos], typeAnnotationState); } case WILDCARD_BOUND: { return searchTypePath(type.asWildcardType().bound(), typeAnnotationState); } case NESTED: { int depth = popNestedDepth(elements); return searchNestedType(type, depth, typeAnnotationState); } } throw new IllegalStateException("Unknown path element"); }
break; case ARRAY: addType(type.asArrayType().component()); break; case TYPE_VARIABLE: {
ArrayType arrayType = type.asArrayType(); stream.writePackedU32(arrayType.dimensions()); writeReference(stream, arrayType.component(), false); // TODO - full should not be necessary break; case PRIMITIVE: