From ca941ae722100d491eee90a25428304b5703628e Mon Sep 17 00:00:00 2001 From: dsyer Date: Wed, 29 Aug 2007 14:41:35 +0000 Subject: [PATCH] Extra javadocs. RESOLVED - issue BATCH-119: ExitStatus can't be used in JMX (or other remote interfaces). http://opensource.atlassian.com/projects/spring/browse/BATCH-119 --- .../support/ExportedJobLauncher.java | 16 ++++++++++++ .../TypeConverterMethodInterceptor.java | 25 +++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/ExportedJobLauncher.java b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/ExportedJobLauncher.java index 20ff58461..9a5aece1a 100644 --- a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/ExportedJobLauncher.java +++ b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/ExportedJobLauncher.java @@ -1,3 +1,19 @@ +/* + * Copyright 2006-2007 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.batch.execution.bootstrap.support; import org.springframework.batch.execution.bootstrap.JobLauncher; diff --git a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/TypeConverterMethodInterceptor.java b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/TypeConverterMethodInterceptor.java index 198520b5e..bdd79bd9a 100644 --- a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/TypeConverterMethodInterceptor.java +++ b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/TypeConverterMethodInterceptor.java @@ -1,3 +1,19 @@ +/* + * Copyright 2006-2007 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.batch.execution.bootstrap.support; import java.lang.reflect.Method; @@ -18,8 +34,7 @@ import org.springframework.util.ReflectionUtils; */ public class TypeConverterMethodInterceptor implements MethodInterceptor { - // Get the default PropertyEditorRegistry free. TODO: make this - // configurable. + // Get the default PropertyEditorRegistry free. private TypeConverter typeConverter = new SimpleTypeConverter(); /** @@ -38,6 +53,12 @@ public class TypeConverterMethodInterceptor implements MethodInterceptor { * possibly with a different return type. If the return type doesn't match * attempt to convert it. * + * @return an object that satisfies the signature of the proxy method. + * + * @throws TypeMismatchException + * if the target method returns an object that cannot be + * converted to the desired type. + * * @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation) */ public Object invoke(MethodInvocation invocation) throws Throwable {