protected class XAbstractProcessor.Assert<T> extends Object
| Constructor and Description |
|---|
Assert(boolean assertion) |
Assert(T value,
boolean assertion) |
Assert(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
T |
doNoThing()
If the assert fail, throw an
AssertException. |
T |
log(String msg) |
T |
log(String msg,
Element element) |
T |
log(String msg,
Element element,
AnnotationMirror annotation) |
T |
log(String msg,
Element element,
AnnotationMirror annotation,
AnnotationValue av) |
T |
log(String msg,
Element element,
Class<? extends Annotation> annotation) |
T |
log(String msg,
Element element,
Class<? extends Annotation> annotation,
AnnotationValue av) |
T |
message(String msg)
If the assert fail, throw an
AssertException with given message. |
T |
todo(Runnable task)
If the assert fail, do the task and then throw an
AssertException. |
public Assert(boolean assertion)
public Assert(T value, boolean assertion)
public Assert(Throwable cause)
public T message(String msg)
AssertException with given message.
Or return the success value.msg - the fail messagepublic T todo(Runnable task)
AssertException. Or return the success value.task - the task to do when failpublic T doNoThing()
AssertException. Or return the
success value.public T log(String msg, Element element, Class<? extends Annotation> annotation)
public T log(String msg, Element element, AnnotationMirror annotation)
public T log(String msg, Element element, Class<? extends Annotation> annotation, AnnotationValue av)
public T log(String msg, Element element, AnnotationMirror annotation, AnnotationValue av)
Copyright © 2018. All rights reserved.