Package com.google.java.contract.core.model

Examples of com.google.java.contract.core.model.ContractMethodModel.addStatement()


      String code = expr;
      if (!annotation.isVirtual()) {
        code = ContractCreation
            .rebaseLocalCalls(expr, JavaUtils.THAT_VARIABLE, null);
      }
      helperContract.addStatement("return " + code + ";");
    }

    ContractMethodModel contract =
        ContractCreation.createBlankContractMethod(kind, annotation, "$" + id);
    contract.setReturnType(new ClassName("java/lang/Object"));
View Full Code Here


    ContractMethodModel contract =
        ContractCreation.createBlankContractMethod(kind, annotation, "$" + id);
    contract.setReturnType(new ClassName("java/lang/Object"));
    contract.setId(id);

    contract.addStatement("return "
        + ContractCreation.getHelperCallCode(helper, annotation) + ";");
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.