From: <iro...@us...> - 2010-04-25 05:21:48
|
Revision: 219 http://pojomatic.svn.sourceforge.net/pojomatic/?rev=219&view=rev Author: iroberts Date: 2010-04-25 05:21:42 +0000 (Sun, 25 Apr 2010) Log Message: ----------- misc spelling and javadoc corrections Modified Paths: -------------- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/Pojomator.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/AutoDetectPolicy.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/Property.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/SubclassCannotOverrideEquals.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/DefaultPropertyFormatter.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/PropertyFormatter.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PojomatorImpl.java trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PropertyRole.java trunk/PojomaticAll/Pojomatic/src/main/javadoc/overview.html trunk/PojomaticAll/Pojomatic/src/site/xdoc/changes.xml trunk/PojomaticAll/Pojomatic/src/test/java/examples/Auto.java trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/formatter/DefaultPropertyFormatterTest.java trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/ClassPropertiesTest.java trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/PojomatorImplTest.java trunk/PojomaticAll/PojomaticTestUtils/src/main/java/org/pojomatic/test/AssertUtils.java trunk/PojomaticAll/PojomaticTestUtils/src/main/javadoc/overview.html Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/Pojomator.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/Pojomator.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/Pojomator.java 2010-04-25 05:21:42 UTC (rev 219) @@ -121,7 +121,7 @@ * </ul> * If {@code T} is an interface or is annotated with {@link SubclassCannotOverrideEquals}, * then all subclasses of {@code T} are automatically assumed by {@code T}'s {@code Pojomator} - * to be comapatible for equals with each other and with {@code T}. Note that in this case. + * to be compatible for equals with each other and with {@code T}. Note that in this case. * to add an {@link OverridesEquals} annotation or additional * properties for inclusion in {@code equals} to a subclass of {@code T} will * result in a violation of the contract for {@link Object#equals(Object)}. @@ -143,10 +143,10 @@ * @return the differences between {@code instance} and {@code other} * among the properties examined by {@link #doEquals(Object, Object)}. * @throws NullPointerException if {@code instance} or {@code other} is null - * (this behavoir may change in future releases). + * (this behavior may change in future releases). * @throws IllegalArgumentException the type of {@code instance} or of {@code other} is not a * class which is compatible for equality with {@code T} - * (this behavoir may change in future releases). + * (this behavior may change in future releases). * @see #doEquals(Object, Object) */ Differences doDiff(T instance, T other); Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/AutoDetectPolicy.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/AutoDetectPolicy.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/AutoDetectPolicy.java 2010-04-25 05:21:42 UTC (rev 219) @@ -21,5 +21,5 @@ * a different {@link PojomaticPolicy} in {@link AutoProperty} without enabling * property auto-detection. */ - NONE; + NONE } Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/Property.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/Property.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/Property.java 2010-04-25 05:21:42 UTC (rev 219) @@ -27,7 +27,7 @@ /** * The name used to identify the property in the standard {@code toString} representation. If - * empty, the following algorithm is used to determine the name. For a propertiy referenced by + * empty, the following algorithm is used to determine the name. For a property referenced by * field, the name of the field is used. For a property referenced by a method whose name is of * the form {@code getSomeField}, the name {@code someField} will be used. For a boolean property * referenced by a method whose name is of the form {@code isSomeField}, the name Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/SubclassCannotOverrideEquals.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/SubclassCannotOverrideEquals.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/annotations/SubclassCannotOverrideEquals.java 2010-04-25 05:21:42 UTC (rev 219) @@ -7,7 +7,7 @@ /** * Declares that a subclass of the annotated type cannot override the behavior of equals. * - * Abent this annotation, it is assumed that subclasses cannot override {@code equals} for interface + * Absent this annotation, it is assumed that subclasses cannot override {@code equals} for interface * types, and can for other types. * * @see Pojomator#doEquals(Object, Object) Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/DefaultPropertyFormatter.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/DefaultPropertyFormatter.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/DefaultPropertyFormatter.java 2010-04-25 05:21:42 UTC (rev 219) @@ -65,7 +65,7 @@ return Arrays.toString((double[]) value); } else { - throw new IllegalStateException("unexpected primative array base type: " + componentClass); + throw new IllegalStateException("unexpected primitive array base type: " + componentClass); } } else { Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/PropertyFormatter.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/PropertyFormatter.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/formatter/PropertyFormatter.java 2010-04-25 05:21:42 UTC (rev 219) @@ -11,7 +11,7 @@ * Initialize the formatter for use; this method will be called exactly once on an instance, prior * to any calls to {@link #format(Object)}. This method does not need to be * thread-safe. - * @param element + * @param element the field or method this formatter will be used for. */ public void initialize(AnnotatedElement element); Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java 2010-04-25 05:21:42 UTC (rev 219) @@ -106,10 +106,11 @@ /** * Whether instances of {@code otherClass} are candidates for being equal to instances of - * {@code pojoClass} - * @param otherClass + * the class this {@code ClassProperties} instance was created for. + * @param otherClass the class to check for compatibility for equals with. * @return {@code true} if instances of {@code otherClass} are candidates for being equal to - * instances of {@code pojoClass}, or {@code false} otherwise. + * instances of the class this {@code ClassProperties} instance was created for, or {@code false} + * otherwise. */ public boolean isCompatibleForEquals(Class<?> otherClass) { if (!equalsParentClass.isAssignableFrom(otherClass)) { Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PojomatorImpl.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PojomatorImpl.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PojomatorImpl.java 2010-04-25 05:21:42 UTC (rev 219) @@ -143,7 +143,7 @@ else { // should NEVER happen throw new IllegalStateException( - "unknown primative type " + instanceComponentClass.getName()); + "unknown primitive type " + instanceComponentClass.getName()); } } } @@ -299,7 +299,7 @@ return false; } } - else { // instanceComponentClass is primative + else { // instanceComponentClass is primitive if (otherComponentClass != instanceComponentClass) { return false; } @@ -347,7 +347,7 @@ else { // should NEVER happen throw new IllegalStateException( - "unknown primative type " + instanceComponentClass.getName()); + "unknown primitive type " + instanceComponentClass.getName()); } } } Modified: trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PropertyRole.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PropertyRole.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/java/org/pojomatic/internal/PropertyRole.java 2010-04-25 05:21:42 UTC (rev 219) @@ -1,5 +1,5 @@ package org.pojomatic.internal; public enum PropertyRole { - EQUALS, HASH_CODE, TO_STRING; + EQUALS, HASH_CODE, TO_STRING } Modified: trunk/PojomaticAll/Pojomatic/src/main/javadoc/overview.html =================================================================== --- trunk/PojomaticAll/Pojomatic/src/main/javadoc/overview.html 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/main/javadoc/overview.html 2010-04-25 05:21:42 UTC (rev 219) @@ -133,7 +133,7 @@ {@link org.pojomatic.formatter.DefaultPojoFormatter DefaultPojoFormatter}; you can specify your own formatting by providing an alternate implementation of {@link org.pojomatic.formatter.PojoFormatter PojoFormatter} and using the -{@link org.pojomatic.annotations.PojoFormat PojoFormat} annotation. In addition to controling the +{@link org.pojomatic.annotations.PojoFormat PojoFormat} annotation. In addition to controlling the overall format of {@code toString}, the formatting of individual properties can be controlled by a {@link org.pojomatic.annotations.PropertyFormat PropertyFormat} annotation referencing an implementation of {@link org.pojomatic.formatter.PropertyFormatter PropertyFormatter}. In addition Modified: trunk/PojomaticAll/Pojomatic/src/site/xdoc/changes.xml =================================================================== --- trunk/PojomaticAll/Pojomatic/src/site/xdoc/changes.xml 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/site/xdoc/changes.xml 2010-04-25 05:21:42 UTC (rev 219) @@ -29,7 +29,7 @@ </li> <li> Pojomatic will no longer add a method property multiple times if it is overridden - (even if the overridden method is explicitely annotated). + (even if the overridden method is explicitly annotated). </li> <li> <code><a href="apidocs/org/pojomatic/Pojomatic.html#diff%28T,%20S%29">Pojomatic.diff</a></code> @@ -64,4 +64,4 @@ </subsection> </section> </body> -</document> \ No newline at end of file +</document> Modified: trunk/PojomaticAll/Pojomatic/src/test/java/examples/Auto.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/test/java/examples/Auto.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/test/java/examples/Auto.java 2010-04-25 05:21:42 UTC (rev 219) @@ -11,7 +11,7 @@ private boolean test; //included by default @Property(policy=NONE) - private int exlude; + private int exclude; @Property //include a method as well, even though it does not follow the getX convention public String derived() { @@ -39,12 +39,12 @@ this.test = test; } - public int getExlude() { - return exlude; + public int getExclude() { + return exclude; } - public void setExlude(int exlude) { - this.exlude = exlude; + public void setExclude(int exclude) { + this.exclude = exclude; } } Modified: trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/formatter/DefaultPropertyFormatterTest.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/formatter/DefaultPropertyFormatterTest.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/formatter/DefaultPropertyFormatterTest.java 2010-04-25 05:21:42 UTC (rev 219) @@ -69,7 +69,7 @@ formatter.format(new Integer[][] {new Integer[] { 1, 2 }, new Integer[] {3, 4} })); } - @Test public void testFormatDoubleArrayOfPrimatives() { + @Test public void testFormatDoubleArrayOfPrimitives() { assertEquals( "[[1, 2], [3, 4]]", formatter.format(new int[][] {new int[] { 1, 2 }, new int[] {3, 4} })); Modified: trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/ClassPropertiesTest.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/ClassPropertiesTest.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/ClassPropertiesTest.java 2010-04-25 05:21:42 UTC (rev 219) @@ -363,12 +363,12 @@ // not getters public boolean isaEnabled() { return true; } - public int gettyIsAMueseum() { return 1; } + public int gettyIsAMuseum() { return 1; } public String thisIsNotAGetter() { return "really, it's not"; } // some methods we should not grab public void getHello() {} - public int getTripple(int arg) { return arg * 3; } + public int getTriple(int arg) { return arg * 3; } /* static fields are not detected */ Modified: trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/PojomatorImplTest.java =================================================================== --- trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/PojomatorImplTest.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/Pojomatic/src/test/java/org/pojomatic/internal/PojomatorImplTest.java 2010-04-25 05:21:42 UTC (rev 219) @@ -34,7 +34,7 @@ private static final Pojomator<AccessCheckedProperties> ACCESS_CHECKED_PROPERTIES_POJOMATOR = makePojomatorImpl(AccessCheckedProperties.class); - private static final List<Class<?>> PRIMATIVE_TYPES = Arrays.<Class<?>>asList( + private static final List<Class<?>> PRIMITIVE_TYPES = Arrays.<Class<?>>asList( Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE); @@ -80,7 +80,7 @@ new ObjectProperty(null), new ObjectProperty("not null over here"))); } - @Test public void testPrimativePropertyEquals() { + @Test public void testPrimitivePropertyEquals() { assertTrue(INT_PROPERTY_POJOMATOR.doEquals(new IntProperty(3), new IntProperty(3))); assertFalse(INT_PROPERTY_POJOMATOR.doEquals(new IntProperty(3), new IntProperty(4))); } @@ -108,7 +108,7 @@ @Test public void testPrimitiveArrayEquals() throws Exception { final ObjectProperty nullProperty = new ObjectProperty(null); final ObjectProperty objectArrayProperty = new ObjectProperty(new String[] {"foo"}); - for (Class<?> primitiveType : PRIMATIVE_TYPES) { + for (Class<?> primitiveType : PRIMITIVE_TYPES) { ObjectProperty main = new ObjectProperty(Array.newInstance(primitiveType, 3)); ObjectProperty other = new ObjectProperty(Array.newInstance(primitiveType, 3)); ObjectProperty different = new ObjectProperty(Array.newInstance(primitiveType, 4)); @@ -181,7 +181,7 @@ OBJECT_PAIR_PROPERTY_POJOMATOR.doHashCode(new ObjectPairProperty("foo", "bar"))); } - @Test public void testPrimativeHashCode() { + @Test public void testPrimitiveHashCode() { assertEquals( HASH_CODE_MULTIPLIER * HASH_CODE_SEED + 7, INT_PROPERTY_POJOMATOR.doHashCode(new IntProperty(7))); @@ -194,17 +194,17 @@ OBJECT_PROPERTY_POJOMATOR.doHashCode(new ObjectProperty(strings))); } - @Test public void testPrimativeArrayHashCode() throws Exception { - for (Class<?> primitiveType : PRIMATIVE_TYPES) { - Object primativeArray = Array.newInstance(primitiveType, 2); + @Test public void testPrimitiveArrayHashCode() throws Exception { + for (Class<?> primitiveType : PRIMITIVE_TYPES) { + Object primitiveArray = Array.newInstance(primitiveType, 2); int expected = HASH_CODE_MULTIPLIER * HASH_CODE_SEED + - (Integer) Arrays.class.getDeclaredMethod("hashCode", primativeArray.getClass()) - .invoke(null, primativeArray); + (Integer) Arrays.class.getDeclaredMethod("hashCode", primitiveArray.getClass()) + .invoke(null, primitiveArray); assertEquals( - "primative type " + primitiveType, + "primitive type " + primitiveType, expected, OBJECT_PROPERTY_POJOMATOR.doHashCode( - new ObjectProperty(primativeArray))); + new ObjectProperty(primitiveArray))); } } @@ -276,7 +276,7 @@ @SuppressWarnings("unchecked") Pojomator<Object> misCastPojomator = (Pojomator<Object>) pojomator; try { misCastPojomator.doDiff(new ObjectPairProperty(1,2), "wrong"); - fail("exception expcected"); + fail("exception expected"); } catch (IllegalArgumentException e) { assertEquals( @@ -290,7 +290,7 @@ @SuppressWarnings("unchecked") Pojomator<Object> misCastPojomator = (Pojomator<Object>) pojomator; try { misCastPojomator.doDiff("wrong", new ObjectPairProperty(1,2)); - fail("exception expcected"); + fail("exception expected"); } catch (IllegalArgumentException e) { assertEquals( Modified: trunk/PojomaticAll/PojomaticTestUtils/src/main/java/org/pojomatic/test/AssertUtils.java =================================================================== --- trunk/PojomaticAll/PojomaticTestUtils/src/main/java/org/pojomatic/test/AssertUtils.java 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/PojomaticTestUtils/src/main/java/org/pojomatic/test/AssertUtils.java 2010-04-25 05:21:42 UTC (rev 219) @@ -12,6 +12,8 @@ * Determines if two objects are both null or are equal according to * {@link Object#equals(Object)}. * + * @param first the first object to compare + * @param second the second object to compare * @return {@code true} if both objects are null, * or {@code first} is non-null and {@code first.equals(second)}, * {@code false} otherwise Modified: trunk/PojomaticAll/PojomaticTestUtils/src/main/javadoc/overview.html =================================================================== --- trunk/PojomaticAll/PojomaticTestUtils/src/main/javadoc/overview.html 2010-04-24 23:58:36 UTC (rev 218) +++ trunk/PojomaticAll/PojomaticTestUtils/src/main/javadoc/overview.html 2010-04-25 05:21:42 UTC (rev 219) @@ -16,7 +16,7 @@ as determined by {@link Pojomatic#diff(Object, Object)}. </p> <p> - Because Junit and TestNG disagree as to the order of the expected and actual paramters to + Because Junit and TestNG disagree as to the order of the expected and actual parameters to {@code assertEquals}, two {@code PojomaticAssert} classes are provided: {@link org.pojomatic.junit.PojomaticAssert} and {@link org.pojomatic.testng.PojomaticAssert}. </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |