use of scenelib.annotations.el.ATypeElement in project checker-framework by typetools.
the class SceneToStubWriter method formatArrayType.
/**
* Formats the type of an array so that it is printable in Java source code, with the annotations
* from the scenelib representation added in appropriate places.
*
* @param scenelibRep the array's scenelib type element
* @param javacRep the representation of the array's type used by javac
* @return the type formatted to be written to Java source code, followed by a space character
*/
private static String formatArrayType(ATypeElement scenelibRep, ArrayType javacRep) {
TypeMirror componentType = javacRep.getComponentType();
ATypeElement scenelibComponent = getNextArrayLevel(scenelibRep);
while (componentType.getKind() == TypeKind.ARRAY) {
componentType = ((ArrayType) componentType).getComponentType();
scenelibComponent = getNextArrayLevel(scenelibComponent);
}
return formatType(scenelibComponent, componentType) + formatArrayTypeImpl(scenelibRep, javacRep);
}
Aggregations