use of org.wso2.ballerinalang.compiler.tree.BLangAnnotationAttachmentPoint in project ballerina by ballerina-lang.
the class AnnotationAttachment method convertToPackageModel.
/**
* Converts a {@link org.ballerinalang.model.AnnotationAttachment} to {@link AnnotationAttachment}.
* @param annotationAttachment The langconstruct to be converted.
* @return Converted langconstruct.
*/
public static AnnotationAttachment convertToPackageModel(BLangAnnotationAttachmentPoint annotationAttachment) {
if (null != annotationAttachment) {
AnnotationAttachment tempAnnotationAttachment = new AnnotationAttachment();
// tempAnnotationAttachment.setPackagePath(annotationAttachment.getPkgPath());
BLangAnnotationAttachmentPoint.AttachmentPoint attachmentPoint = annotationAttachment.getAttachmentPoint();
if (attachmentPoint != null) {
tempAnnotationAttachment.setAttachedPoint(attachmentPoint.getValue());
}
return tempAnnotationAttachment;
} else {
return null;
}
}
Aggregations