Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystem.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | 2232848be438 |
children | 33e08aca06ff |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystem.java Wed Jan 23 16:34:38 2013 +0100 +++ b/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystem.java Wed Jan 23 16:34:57 2013 +0100 @@ -26,28 +26,29 @@ /** * <p> - * Annotates a type system class that represents type information for a node. Generates code for converting and managing - * types. Methods contained in the type system may be annotated with {@link TypeCast}, {@link TypeCheck} or - * {@link GuardCheck}. These methods alter the default behavior of the type system. + * Annotates a type system class that represents type information for a node. Generates code for + * converting and managing types. Methods contained in the type system may be annotated with + * {@link TypeCast}, {@link TypeCheck} or {@link GuardCheck}. These methods alter the default + * behavior of the type system. * </p> - * - * + * + * * <b>Example:</b> * <p> - * Shows a <code>@TypeSystem</code> definition with three types. In this example BigIntegers can be also treated as - * integers if their bit width is less than 32. + * Shows a <code>@TypeSystem</code> definition with three types. In this example BigIntegers can be + * also treated as integers if their bit width is less than 32. * </p> - * + * * <pre> - * + * * {@literal @}TypeSystem(types = {int.class, BigInteger.class, String.class}, nodeBaseClass = TypedNode.class) * public abstract class Types { - * + * * {@literal @}TypeCheck * public boolean isInteger(Object value) { * return value instanceof Integer || (value instanceof BigInteger && ((BigInteger) value).bitLength() < Integer.SIZE); * } - * + * * {@literal @}TypeCast * public int asInteger(Object value) { * if (value instanceof Integer) { @@ -58,7 +59,7 @@ * } * } * </pre> - * + * * @see TypeCast * @see TypeCheck * @see GuardCheck @@ -68,7 +69,8 @@ public @interface TypeSystem { /** - * Sets the types contained by this type system. The order of types also determines the order of specialization. + * Sets the types contained by this type system. The order of types also determines the order of + * specialization. */ Class[] value();