Search in sources :

Example 1 with TypeAnnotationPosition

use of com.sun.tools.javac.code.TypeAnnotationPosition in project checker-framework by typetools.

the class TypeAnnotationUtils method methodParameterTAPosition.

public static TypeAnnotationPosition methodParameterTAPosition(final int pidx, final int pos) {
    TypeAnnotationPosition tapos = new TypeAnnotationPosition();
    tapos.type = TargetType.METHOD_FORMAL_PARAMETER;
    tapos.parameter_index = pidx;
    tapos.pos = pos;
    return tapos;
}
Also used : TypeAnnotationPosition(com.sun.tools.javac.code.TypeAnnotationPosition)

Example 2 with TypeAnnotationPosition

use of com.sun.tools.javac.code.TypeAnnotationPosition in project checker-framework by typetools.

the class TypeAnnotationUtils method copyTAPosition.

public static TypeAnnotationPosition copyTAPosition(final TypeAnnotationPosition tapos) {
    TypeAnnotationPosition res = new TypeAnnotationPosition();
    res.isValidOffset = tapos.isValidOffset;
    res.bound_index = tapos.bound_index;
    res.exception_index = tapos.exception_index;
    res.location = List.from(tapos.location);
    if (tapos.lvarIndex != null) {
        res.lvarIndex = Arrays.copyOf(tapos.lvarIndex, tapos.lvarIndex.length);
    }
    if (tapos.lvarLength != null) {
        res.lvarLength = Arrays.copyOf(tapos.lvarLength, tapos.lvarLength.length);
    }
    if (tapos.lvarOffset != null) {
        res.lvarOffset = Arrays.copyOf(tapos.lvarOffset, tapos.lvarOffset.length);
    }
    res.offset = tapos.offset;
    res.onLambda = tapos.onLambda;
    res.parameter_index = tapos.parameter_index;
    res.pos = tapos.pos;
    res.type = tapos.type;
    res.type_index = tapos.type_index;
    return res;
}
Also used : TypeAnnotationPosition(com.sun.tools.javac.code.TypeAnnotationPosition)

Example 3 with TypeAnnotationPosition

use of com.sun.tools.javac.code.TypeAnnotationPosition in project checker-framework by typetools.

the class TypeAnnotationUtils method methodReturnTAPosition.

public static TypeAnnotationPosition methodReturnTAPosition(final int pos) {
    TypeAnnotationPosition tapos = new TypeAnnotationPosition();
    tapos.type = TargetType.METHOD_RETURN;
    tapos.pos = pos;
    return tapos;
}
Also used : TypeAnnotationPosition(com.sun.tools.javac.code.TypeAnnotationPosition)

Example 4 with TypeAnnotationPosition

use of com.sun.tools.javac.code.TypeAnnotationPosition in project checker-framework by typetools.

the class TypeAnnotationUtils method fieldTAPosition.

public static TypeAnnotationPosition fieldTAPosition(final int pos) {
    TypeAnnotationPosition tapos = new TypeAnnotationPosition();
    tapos.type = TargetType.FIELD;
    tapos.pos = pos;
    return tapos;
}
Also used : TypeAnnotationPosition(com.sun.tools.javac.code.TypeAnnotationPosition)

Example 5 with TypeAnnotationPosition

use of com.sun.tools.javac.code.TypeAnnotationPosition in project checker-framework by typetools.

the class TypeAnnotationUtils method methodTypeParameterBoundTAPosition.

public static TypeAnnotationPosition methodTypeParameterBoundTAPosition(final int tpidx, final int bndidx, final int pos) {
    TypeAnnotationPosition tapos = new TypeAnnotationPosition();
    tapos.type = TargetType.METHOD_TYPE_PARAMETER_BOUND;
    tapos.parameter_index = tpidx;
    tapos.bound_index = bndidx;
    tapos.pos = pos;
    return tapos;
}
Also used : TypeAnnotationPosition(com.sun.tools.javac.code.TypeAnnotationPosition)

Aggregations

TypeAnnotationPosition (com.sun.tools.javac.code.TypeAnnotationPosition)18 TypeCompound (com.sun.tools.javac.code.Attribute.TypeCompound)5 Attribute (com.sun.tools.javac.code.Attribute)2 VarSymbol (com.sun.tools.javac.code.Symbol.VarSymbol)2 JCTree (com.sun.tools.javac.tree.JCTree)2 List (com.sun.tools.javac.util.List)2 ArrayList (java.util.ArrayList)2 TypeParameterTree (com.sun.source.tree.TypeParameterTree)1 MethodSymbol (com.sun.tools.javac.code.Symbol.MethodSymbol)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 AnnotationMirror (javax.lang.model.element.AnnotationMirror)1 AnnotatedTypeMirror (org.checkerframework.framework.type.AnnotatedTypeMirror)1 AnnotatedExecutableType (org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedExecutableType)1 AnnotatedTypeVariable (org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedTypeVariable)1