Top Description Methods
org.droidparts.dexmaker.dx.util

public Interface AnnotatedOutput

extends Output
Known Direct Implementers
org.droidparts.dexmaker.dx.util.ByteArrayAnnotatedOutput

Interface for a binary output destination that may be augmented with textual annotations.

Method Summary

Modifier and TypeMethod and Description
public void
annotate(String
non-null; the annotation message
msg
)

Add an annotation for the subsequent output.

public void
annotate(int
>= 0; the amount of output for this annotation to cover
amt
,
String
non-null; the annotation message
msg
)

Add an annotation for a specified amount of subsequent output.

public boolean

Returns:

true iff annotations are being kept
annotates
()

Get whether this instance will actually keep annotations.

public void
endAnnotation()

End the most recent annotation.

public int

Returns:

>= 1; the maximum width
getAnnotationWidth
()

Get the maximum width of the annotated output.

public boolean

Returns:

true iff annotations are to be verbose
isVerbose
()

Get whether this instance is intended to keep verbose annotations.

Inherited from org.droidparts.dexmaker.dx.util.Output:
alignToassertCursorgetCursorwritewritewritewriteBytewriteIntwriteLongwriteShortwriteSleb128writeUleb128writeZeroes

Method Detail

annotateback to summary
public void annotate(String msg)

Add an annotation for the subsequent output. Any previously open annotation will be closed by this call, and the new annotation marks all subsequent output until another annotation call.

Parameters
msg:String

non-null; the annotation message

annotateback to summary
public void annotate(int amt, String msg)

Add an annotation for a specified amount of subsequent output. Any previously open annotation will be closed by this call. If there is already pending annotation from one or more previous calls to this method, the new call "consumes" output after all the output covered by the previous calls.

Parameters
amt:int

>= 0; the amount of output for this annotation to cover

msg:String

non-null; the annotation message

annotatesback to summary
public boolean annotates()

Get whether this instance will actually keep annotations.

Returns:boolean

true iff annotations are being kept

endAnnotationback to summary
public void endAnnotation()

End the most recent annotation. Subsequent output will be unannotated, until the next call to annotate.

getAnnotationWidthback to summary
public int getAnnotationWidth()

Get the maximum width of the annotated output. This is advisory: Implementations of this interface are encouraged to deal with too-wide output, but annotaters are encouraged to attempt to avoid exceeding the indicated width.

Returns:int

>= 1; the maximum width

isVerboseback to summary
public boolean isVerbose()

Get whether this instance is intended to keep verbose annotations. Annotators may use the result of calling this method to inform their annotation activity.

Returns:boolean

true iff annotations are to be verbose