/** * Convenience method for adding an annotation to this span, same as * <code>getSpanTree().{@link SpanTree#annotate(SpanNode,AnnotationType,FieldValue) spanTree.annotate(this,type,value)}</code> * * @param type the type of the annotation to add * @param value the value of the annotation to add * @return this for chaining * @throws NullPointerException if this span is not attached to a tree */ public SpanNode annotate(AnnotationType type,FieldValue value) { getNonNullSpanTree().annotate(this,type,value); return this; }
/** * Convenience method for adding an annotation to this span, same as * <code>getSpanTree().{@link SpanTree#annotate(SpanNode,Annotation) spanTree.annotate(this,annotation)}</code> * * @param annotation the annotation to add * @return this for chaining * @throws NullPointerException if this span is not attached to a tree */ public SpanNode annotate(Annotation annotation) { getNonNullSpanTree().annotate(this, annotation); return this; }
/** * Convenience method for adding an annotation with no value to this span, same as * <code>getSpanTree().{@link SpanTree#annotate(SpanNode,AnnotationType) spanTree.annotate(this,type)}</code> * * @param type the type of the annotation to add * @return this for chaining * @throws NullPointerException if this span is not attached to a tree */ public SpanNode annotate(AnnotationType type) { getNonNullSpanTree().annotate(this,type); return this; }
/** * Convenience method for adding an annotation to this span, same as * <code>getSpanTree().{@link SpanTree#annotate(SpanNode,AnnotationType,FieldValue) spanTree.annotate(this,type,new IntegerFieldValue(value))}</code> * * @param type the type of the annotation to add * @param value the integer value of the annotation to add * @return this for chaining * @throws NullPointerException if this span is not attached to a tree */ public SpanNode annotate(AnnotationType type,Integer value) { getNonNullSpanTree().annotate(this, type, new IntegerFieldValue(value)); return this; }
/** * Convenience method for adding an annotation to this span, same as * <code>getSpanTree().{@link SpanTree#annotate(SpanNode,AnnotationType,FieldValue) spanTree.annotate(this,type,new StringFieldValue(value))}</code> * * @param type the type of the annotation to add * @param value the string value of the annotation to add * @return this for chaining * @throws NullPointerException if this span is not attached to a tree */ public SpanNode annotate(AnnotationType type,String value) { getNonNullSpanTree().annotate(this, type, new StringFieldValue(value)); return this; }