- Revision
- 1438
- Author
- rfscholte
- Date
- 2011-10-22 16:51:50 -0500 (Sat, 22 Oct 2011)
Log Message
Javadoc + code formatting
Modified Paths
- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/BeanProperty.java
- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/impl/DefaultBeanProperty.java
Diff
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/BeanProperty.java (1437 => 1438)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/BeanProperty.java 2011-10-22 20:21:09 UTC (rev 1437) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/BeanProperty.java 2011-10-22 21:51:50 UTC (rev 1438) @@ -20,17 +20,38 @@ */ /** - * * @author Aslak Hellesøy * @version $Revision$ */ -public interface BeanProperty { - +public interface BeanProperty +{ + + /** + * The name of the bean, which is based on the name of the mutator or accessor, not on the field. + * + * @return the name of the bean + */ String getName(); - + + /** + * The type of the bean, either used as argument type of the mutator or return type of the accessor. + * + * @return the type of the bean + */ JavaType getType(); + /** + * This can return both the <code>isProperty</code> if the property is of type {@link Boolean} or + * <code>getProperty</code> for any other type of {@link Object}. + * + * @return the getter, otherwise <code>null</code> + */ JavaMethod getAccessor(); + /** + * The setter-method of the bean. + * + * @return the setter, otherwise <code>null</code> + */ JavaMethod getMutator(); -} +} \ No newline at end of file
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/impl/DefaultBeanProperty.java (1437 => 1438)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/impl/DefaultBeanProperty.java 2011-10-22 20:21:09 UTC (rev 1437) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/impl/DefaultBeanProperty.java 2011-10-22 21:51:50 UTC (rev 1438) @@ -23,43 +23,59 @@ * under the License. */ -public class DefaultBeanProperty implements BeanProperty +public class DefaultBeanProperty + implements BeanProperty { private final String name; + private JavaMethod accessor; + private JavaMethod mutator; + private JavaType type; - public DefaultBeanProperty(String name) { + public DefaultBeanProperty( String name ) + { this.name = name; } - public String getName() { + /** {@inheritDoc} */ + public String getName() + { return name; } - public void setType(JavaType type) { + public void setType( JavaType type ) + { this.type = type; } - public JavaType getType() { + /** {@inheritDoc} */ + public JavaType getType() + { return type; } - public JavaMethod getAccessor() { + /** {@inheritDoc} */ + public JavaMethod getAccessor() + { return accessor; } - public void setAccessor(JavaMethod accessor) { + public void setAccessor( JavaMethod accessor ) + { this.accessor = accessor; } - public JavaMethod getMutator() { + /** {@inheritDoc} */ + public JavaMethod getMutator() + { return mutator; } - public void setMutator(JavaMethod mutator) { + public void setMutator( JavaMethod mutator ) + { this.mutator = mutator; } -} +} \ No newline at end of file
To unsubscribe from this list please visit:
