[jboss-svn-commits] JBL Code SVN: r22294 - labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 1 11:08:55 EDT 2008
Author: tfennelly
Date: 2008-09-01 11:08:55 -0400 (Mon, 01 Sep 2008)
New Revision: 22294
Modified:
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java
labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java
Log:
checkstyle fixes
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java 2008-09-01 12:24:19 UTC (rev 22293)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java 2008-09-01 15:08:55 UTC (rev 22294)
@@ -67,6 +67,8 @@
/**
* Initialize the visitor.
+ *
+ * @throws SmooksConfigurationException Unable to load the expected type class.
*/
@Initialize
public final void initialize() throws SmooksConfigurationException
@@ -114,7 +116,8 @@
Class objectClass = ClassUtil.forName(objectClassName, CreateObject.class);
Constructor defaultConstructor;
- if(expectedType != null && !expectedType.isAssignableFrom(objectClass)) {
+ if (expectedType != null && !expectedType.isAssignableFrom(objectClass))
+ {
throw new SmooksException("Class '" + objectClass.getName() + "' must implement/extend '" + expectedType.getName() + "'.");
}
Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java 2008-09-01 12:24:19 UTC (rev 22293)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java 2008-09-01 15:08:55 UTC (rev 22294)
@@ -91,7 +91,15 @@
}
}
- private final void setPropertyValue(final Field field, Object instance, final String value) throws IllegalAccessException
+ /**
+ * Set property value.
+ *
+ * @param field The property field.
+ * @param instance The Object instance.
+ * @param value The property value.
+ * @throws IllegalAccessException Property access exception.
+ */
+ private void setPropertyValue(final Field field, final Object instance, final String value) throws IllegalAccessException
{
boolean isAccessible = field.isAccessible();
DataDecoder decoder = DataDecoder.Factory.create(field.getType());
@@ -110,19 +118,16 @@
}
}
- private final String getPropertyValue(final Element element)
+ /**
+ * Get the {@link Field} for the specified property of the specified class.
+ *
+ * @param propertyName The property name.
+ * @param objectClass The class.
+ * @return The property field.
+ * @throws NoSuchFieldException Unknown property field.
+ */
+ private Field getPropertyField(final String propertyName, final Class objectClass) throws NoSuchFieldException
{
- if (valueAttrib != null)
- {
- return DomUtils.getAttributeValue(element, valueAttrib);
- } else
- {
- return DomUtils.getAllText(element, true);
- }
- }
-
- private final Field getPropertyField(final String propertyName, final Class objectClass) throws NoSuchFieldException
- {
try
{
return objectClass.getDeclaredField(propertyName);
@@ -137,7 +142,14 @@
}
}
- private Object getObject(ExecutionContext executionContext)
+ /**
+ * Get the property bean instance from the supplied Smooks ExecutionContext.
+ *
+ * @param executionContext The Smooks Execution Context.
+ * @return The bean object instance.
+ * @throws SmooksException Unable to find bean in context.
+ */
+ private Object getObject(final ExecutionContext executionContext) throws SmooksException
{
Object bean = BeanRepositoryManager.getBeanRepository(executionContext).getBean(beanId);
@@ -148,7 +160,13 @@
return bean;
}
- private final String getPropertyName(final Element element)
+ /**
+ * Get the property name from the supplied property DOM element.
+ *
+ * @param element The property DOM element.
+ * @return The property name.
+ */
+ private String getPropertyName(final Element element)
{
String propertyName;
@@ -169,4 +187,21 @@
return propertyName;
}
+
+ /**
+ * Get the property value from the supplied property DOM element.
+ *
+ * @param element The property DOM element.
+ * @return The property String value.
+ */
+ private String getPropertyValue(final Element element)
+ {
+ if (valueAttrib != null)
+ {
+ return DomUtils.getAttributeValue(element, valueAttrib);
+ } else
+ {
+ return DomUtils.getAllText(element, true);
+ }
+ }
}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list