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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations