protected void translateAssertWithAssertionsEnabled(AssertTree tree){
  Label assertEnd=new Label();
  Label elseEntry=new Label();
  Node condition=unbox(scan(tree.getCondition(),null));
  ConditionalJump cjump=new ConditionalJump(assertEnd,elseEntry);
  extendWithExtendedNode(cjump);
  Node detail=null;
  addLabelForNextNode(elseEntry);
  if (tree.getDetail() != null) {
    detail=scan(tree.getDetail(),null);
  }
  TypeElement assertException=elements.getTypeElement("java.lang.AssertionError");
  AssertionErrorNode assertNode=new AssertionErrorNode(tree,condition,detail,assertException.asType());
  extendWithNode(assertNode);
  NodeWithExceptionsHolder exNode=extendWithNodeWithException(new ThrowNode(null,assertNode,env.getTypeUtils()),assertException.asType());
  exNode.setTerminatesExecution(true);
  addLabelForNextNode(assertEnd);
}

protected void translateAssertWithAssertionsEnabled ( AssertTree tree ) { Label assertEnd = new Label ( ) ; Label elseEntry = new Label ( ) ; Node condition = unbox ( scan ( tree . getCondition ( ) , null ) ) ; ConditionalJump cjump = new ConditionalJump ( assertEnd , elseEntry ) ; extendWithExtendedNode ( cjump ) ; Node detail = null ; addLabelForNextNode ( elseEntry ) ; if ( tree . getDetail ( ) != null ) { detail = scan ( tree . getDetail ( ) , null ) ; } TypeElement assertException = elements . getTypeElement ( "java.lang.AssertionError" ) ; AssertionErrorNode assertNode = new AssertionErrorNode ( tree , condition , detail , assertException . asType ( ) ) ; extendWithNode ( assertNode ) ; NodeWithExceptionsHolder exNode = extendWithNodeWithException ( new ThrowNode ( null , assertNode , env . getTypeUtils ( ) ) , assertException . asType ( ) ) ; exNode . setTerminatesExecution ( true ) ; addLabelForNextNode ( assertEnd ) ; }
translates an assertion statement to the correct cfg nodes . the translation assumes that assertions are enabled .
