# HG changeset patch # User Jaroslav Tulach # Date 1234708948 -3600 # Node ID 4e59b6b0e907db6ee0f4f5d9ee20b9954307dbaa # Parent c12a563d36a40132f924c033d6e0f7ac8ae5069c Exposing the whole runtime check Arithmetica as code snippet diff -r c12a563d36a4 -r 4e59b6b0e907 samples/composition/src-api2.0-runtime/org/apidesign/math/Arithmetica.java --- a/samples/composition/src-api2.0-runtime/org/apidesign/math/Arithmetica.java Sat Feb 14 17:37:55 2009 +0100 +++ b/samples/composition/src-api2.0-runtime/org/apidesign/math/Arithmetica.java Sun Feb 15 15:42:28 2009 +0100 @@ -1,6 +1,5 @@ package org.apidesign.math; -import org.apidesign.math.Arithmetica; import org.apidesign.runtime.check.RuntimeCheck; /** Class to simplify arithmetical operations, improved version to compute @@ -10,6 +9,7 @@ * @author Jaroslav Tulach * @version 2.0 */ +// BEGIN: design.composition.arith.runtime public class Arithmetica { public int sumTwo(int one, int second) { return one + second; @@ -60,7 +60,9 @@ if (myLoader == caller) { continue; } - if (RuntimeCheck.requiresAtLeast("2.6", "api.Arithmetica", caller)) { + if (RuntimeCheck.requiresAtLeast( + "2.0", "org.apidesign.math", caller + )) { return true; } return false; @@ -70,3 +72,4 @@ } } +// END: design.composition.arith.runtime