You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2006/09/10 07:48:46 UTC
svn commit: r441912 - in /incubator/tuscany/java/sca/kernel: core/
core/src/main/java/org/apache/tuscany/core/implementation/
core/src/main/java/org/apache/tuscany/core/implementation/processor/
core/src/test/java/org/apache/tuscany/core/implementation...
Author: jmarino
Date: Sat Sep 9 22:48:45 2006
New Revision: 441912
URL: http://svn.apache.org/viewvc?view=rev&rev=441912
Log:
remove compiler warnings related to generics in core
Modified:
incubator/tuscany/java/sca/kernel/core/pom.xml
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/IntrospectionRegistryImpl.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/AbstractPropertyProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/PropertyProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ScopeProcessor.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ServiceProcessor.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorAutowireTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorExtensibilityTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorPropertyTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorReferenceTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/java/builder/JavaBuilderPropertyTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/StAXLoaderRegistryImplTestCase.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/work/jsr237/workmanager/ThreadPoolWorkManagerTestCase.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessor.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessorExtension.java
Modified: incubator/tuscany/java/sca/kernel/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/pom.xml?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/pom.xml (original)
+++ incubator/tuscany/java/sca/kernel/core/pom.xml Sat Sep 9 22:48:45 2006
@@ -68,7 +68,9 @@
</dependency>
<dependency>
<groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
</dependency>
</dependencies>
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/IntrospectionRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/IntrospectionRegistryImpl.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/IntrospectionRegistryImpl.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/IntrospectionRegistryImpl.java Sat Sep 9 22:48:45 2006
@@ -78,7 +78,7 @@
processor.visitClass(parent, clazz, type, null);
}
- for (Constructor constructor : clazz.getConstructors()) {
+ for (Constructor<?> constructor : clazz.getConstructors()) {
for (ImplementationProcessor processor : cache) {
processor.visitConstructor(parent, constructor, type, null);
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/AbstractPropertyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/AbstractPropertyProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/AbstractPropertyProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/AbstractPropertyProcessor.java Sat Sep 9 22:48:45 2006
@@ -120,7 +120,7 @@
properties.put(name, property);
}
- public void visitConstructor(CompositeComponent parent, Constructor<?> constructor,
+ public <T> void visitConstructor(CompositeComponent parent, Constructor<T> constructor,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException {
@@ -134,7 +134,7 @@
for (Annotation annotation : paramAnnotations) {
if (annotation.annotationType().equals(annotationClass)) {
if (definition == null) {
- definition = new ConstructorDefinition(constructor);
+ definition = new ConstructorDefinition<T>(constructor);
type.setConstructorDefinition(definition);
}
A monitorAnnot = annotationClass.cast(annotation);
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessor.java Sat Sep 9 22:48:45 2006
@@ -48,7 +48,7 @@
this.service = service;
}
- public void visitClass(CompositeComponent parent, Class<?> clazz,
+ public <T> void visitClass(CompositeComponent parent, Class<T> clazz,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException {
Constructor[] ctors = clazz.getConstructors();
@@ -66,7 +66,7 @@
}
}
- public void visitConstructor(CompositeComponent parent, Constructor<?> constructor,
+ public <T> void visitConstructor(CompositeComponent parent, Constructor<T> constructor,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException {
org.osoa.sca.annotations.Constructor annotation =
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessor.java Sat Sep 9 22:48:45 2006
@@ -18,12 +18,6 @@
*/
package org.apache.tuscany.core.implementation.processor;
-import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllInterfaces;
-import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllPublicAndProtectedFields;
-import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllUniquePublicProtectedMethods;
-import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getBaseName;
-import static org.apache.tuscany.core.util.JavaIntrospectionHelper.toPropertyName;
-
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
@@ -38,6 +32,9 @@
import java.util.Map;
import java.util.Set;
+import org.osoa.sca.annotations.Remotable;
+import org.osoa.sca.annotations.Service;
+
import org.apache.tuscany.spi.annotation.Autowire;
import org.apache.tuscany.spi.component.CompositeComponent;
import org.apache.tuscany.spi.deployer.DeploymentContext;
@@ -49,34 +46,37 @@
import org.apache.tuscany.spi.implementation.java.JavaMappedService;
import org.apache.tuscany.spi.implementation.java.PojoComponentType;
import org.apache.tuscany.spi.implementation.java.ProcessingException;
-import org.osoa.sca.annotations.Remotable;
-import org.osoa.sca.annotations.Service;
+
+import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllInterfaces;
+import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllPublicAndProtectedFields;
+import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getAllUniquePublicProtectedMethods;
+import static org.apache.tuscany.core.util.JavaIntrospectionHelper.getBaseName;
+import static org.apache.tuscany.core.util.JavaIntrospectionHelper.toPropertyName;
/**
* Heuristically evaluates an un-annotated Java implementation type to determine services, references, and properties
* according to the algorithm described in the SCA Java Client and Implementation Model Specification <p/> TODO
* Implement:
- * <p>
+ * <p/>
* When no service inteface is annotated, need to calculate a single service comprising all public methods that are not
* reference or property injection sites. If that service can be exactly mapped to an interface implemented by the class
* then the service interface will be defined in terms of that interface.
- *
+ *
* @version $Rev$ $Date$
*/
public class HeuristicPojoProcessor extends ImplementationProcessorExtension {
private ImplementationProcessorService implService;
- public HeuristicPojoProcessor(@Autowire
- ImplementationProcessorService service) {
+ public HeuristicPojoProcessor(@Autowire ImplementationProcessorService service) {
this.implService = service;
}
- public void visitEnd(
- CompositeComponent parent,
- Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context) throws ProcessingException {
+ public <T> void visitEnd(
+ CompositeComponent parent,
+ Class<T> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context) throws ProcessingException {
Map<String, JavaMappedService> services = type.getServices();
if (services.isEmpty()) {
// heuristically determine the service
@@ -164,23 +164,23 @@
/**
* Determines the constructor to use based on the component type's references and properties
- *
- * @param type the component type
+ *
+ * @param type the component type
* @param clazz the implementation class corresponding to the component type
- * @throws NoConstructorException if no suitable constructor is found
+ * @throws NoConstructorException if no suitable constructor is found
* @throws AmbiguousConstructorException if the parameters of a constructor cannot be unambiguously mapped to
- * references and properties
+ * references and properties
*/
@SuppressWarnings("unchecked")
- private void evaluateConstructor(
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- Class<?> clazz) throws ProcessingException {
+ private <T> void evaluateConstructor(
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ Class<T> clazz) throws ProcessingException {
// determine constructor if one is not annotated
ConstructorDefinition<?> definition = type.getConstructorDefinition();
Constructor constructor;
boolean explict = false;
if (definition != null
- && definition.getConstructor().getAnnotation(org.osoa.sca.annotations.Constructor.class) != null) {
+ && definition.getConstructor().getAnnotation(org.osoa.sca.annotations.Constructor.class) != null) {
// the constructor was already defined explicitly
return;
} else if (definition != null) {
@@ -197,9 +197,9 @@
constructor = constructors[0];
} else {
// FIXME multiple constructors, none yet done
- Constructor selected = null;
+ Constructor<T> selected = null;
int sites = type.getProperties().size() + type.getReferences().size();
- for (Constructor ctor : constructors) {
+ for (Constructor<T> ctor : constructors) {
if (ctor.getParameterTypes().length == 0) {
selected = ctor;
}
@@ -214,11 +214,11 @@
throw new NoConstructorException();
}
constructor = selected;
- definition = new ConstructorDefinition(selected);
+ definition = new ConstructorDefinition<T>(selected);
type.setConstructorDefinition(definition);
// return;
}
- definition = new ConstructorDefinition(constructor);
+ definition = new ConstructorDefinition<T>(constructor);
type.setConstructorDefinition(definition);
}
Class[] params = constructor.getParameterTypes();
@@ -275,7 +275,7 @@
* Returns true if the union of the given collections of properties and references have unique Java types
*/
private boolean calcPropRefUniqueness(
- Collection<JavaMappedProperty<?>> props,
+ Collection<JavaMappedProperty<?>> props,
Collection<JavaMappedReference> refs) {
Class[] classes = new Class[props.size() + refs.size()];
@@ -293,21 +293,21 @@
/**
* Unambiguously finds the reference or property associated with the given type
- *
+ *
* @return the name of the reference or property if found, null if not
* @throws AmbiguousConstructorException if the constructor parameter cannot be resolved to a property or reference
*/
private String findReferenceOrProperty(
- Class<?> type,
- Map<String, JavaMappedProperty<?>> props,
- Map<String, JavaMappedReference> refs) throws AmbiguousConstructorException {
+ Class<?> type,
+ Map<String, JavaMappedProperty<?>> props,
+ Map<String, JavaMappedReference> refs) throws AmbiguousConstructorException {
String name = null;
for (JavaMappedProperty<?> property : props.values()) {
if (property.getJavaType().equals(type)) {
if (name != null) {
AmbiguousConstructorException e =
- new AmbiguousConstructorException("Ambiguous property or reference for constructor type");
+ new AmbiguousConstructorException("Ambiguous property or reference for constructor type");
e.setIdentifier(type.getName());
throw e;
}
@@ -319,7 +319,7 @@
if (reference.getServiceContract().getInterfaceClass().equals(type)) {
if (name != null) {
AmbiguousConstructorException e =
- new AmbiguousConstructorException("Ambiguous property or reference for constructor type");
+ new AmbiguousConstructorException("Ambiguous property or reference for constructor type");
e.setIdentifier(type.getName());
throw e;
}
@@ -354,7 +354,7 @@
}
if (referenceType != null) {
return referenceType.getAnnotation(Remotable.class) != null
- || referenceType.getAnnotation(Service.class) != null;
+ || referenceType.getAnnotation(Service.class) != null;
} else {
return rawType.getAnnotation(Remotable.class) != null || rawType.getAnnotation(Service.class) != null;
}
@@ -372,7 +372,7 @@
Method[] methods = service.getServiceContract().getInterfaceClass().getMethods();
for (Method method : methods) {
if (operation.getName().equals(method.getName())
- && operation.getParameterTypes().length == method.getParameterTypes().length) {
+ && operation.getParameterTypes().length == method.getParameterTypes().length) {
Class<?>[] methodTypes = method.getParameterTypes();
for (int i = 0; i < operation.getParameterTypes().length; i++) {
Class<?> paramType = operation.getParameterTypes()[i];
@@ -390,9 +390,9 @@
/**
* Creates a mapped reference
- *
- * @param name the reference name
- * @param member the injection site the reference maps to
+ *
+ * @param name the reference name
+ * @param member the injection site the reference maps to
* @param paramType the service interface of the reference
*/
private JavaMappedReference createReference(String name, Member member, Class<?> paramType)
@@ -402,9 +402,9 @@
/**
* Creates a mapped property
- *
- * @param name the property name
- * @param member the injection site the reference maps to
+ *
+ * @param name the property name
+ * @param member the injection site the reference maps to
* @param paramType the property type
*/
private <T> JavaMappedProperty<T> createProperty(String name, Member member, Class<T> paramType) {
@@ -420,15 +420,15 @@
* Populates a component type with a service whose interface type is determined by examining all implemented
* interfaces of the given class and chosing one whose operations match all of the class's non-property and
* non-reference methods
- *
- * @param clazz the class to examine
- * @param type the component type
+ *
+ * @param clazz the class to examine
+ * @param type the component type
* @param methods all methods in the class to examine
*/
private void calculateServiceInterface(
- Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- Set<Method> methods) throws ProcessingException {
+ Class<?> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ Set<Method> methods) throws ProcessingException {
List<Method> nonPropRefMethods = new ArrayList<Method>();
// Map<String, JavaMappedService> services = type.getServices();
Map<String, JavaMappedReference> references = type.getReferences();
@@ -460,8 +460,8 @@
/**
* Determines if the methods of a given interface match the given list of methods
- *
- * @param interfaze the interface to examine
+ *
+ * @param interfaze the interface to examine
* @param nonPropRefMethods the list of methods to match against
* @return true if the interface matches
*/
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/PropertyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/PropertyProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/PropertyProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/PropertyProcessor.java Sat Sep 9 22:48:45 2006
@@ -22,17 +22,15 @@
import org.osoa.sca.annotations.Property;
+import org.apache.tuscany.spi.annotation.Autowire;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
import org.apache.tuscany.spi.implementation.java.JavaMappedProperty;
-import org.apache.tuscany.spi.implementation.java.JavaMappedService;
-
import org.apache.tuscany.spi.implementation.java.JavaMappedReference;
+import org.apache.tuscany.spi.implementation.java.JavaMappedService;
import org.apache.tuscany.spi.implementation.java.PojoComponentType;
import org.apache.tuscany.spi.implementation.java.ProcessingException;
-import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.deployer.DeploymentContext;
-import org.apache.tuscany.spi.annotation.Autowire;
-
/**
* Processes an {@link @Property} annotation, updating the component type with corresponding {@link JavaMappedProperty}
*
@@ -55,9 +53,10 @@
property.setRequired(annotation.required());
}
- public void visitConstructor(CompositeComponent parent, Constructor<?> constructor,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context) throws ProcessingException {
+ public <T> void visitConstructor(CompositeComponent parent, Constructor<T> constructor,
+ PojoComponentType<JavaMappedService, JavaMappedReference,
+ JavaMappedProperty<?>> type,
+ DeploymentContext context) throws ProcessingException {
// override since heuristic pojo processor evalautes properties
}
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ReferenceProcessor.java Sat Sep 9 22:48:45 2006
@@ -103,18 +103,8 @@
} catch (InvalidServiceContractException e) {
throw new ProcessingException(e);
}
-// ServiceContract contract = new JavaServiceContract();
-// Class<?> interfaceType = method.getParameterTypes()[0];
-// String interfaceName = getBaseName(interfaceType);
-// contract.setInterfaceName(interfaceName);
-// contract.setInterfaceClass(interfaceType);
reference.setServiceContract(contract);
type.getReferences().put(name, reference);
-// try {
-// implService.processCallback(interfaceType, contract);
-// } catch (IllegalCallbackException e) {
-// throw new ProcessingException(e);
-// }
}
public void visitField(CompositeComponent parent, Field field,
@@ -150,25 +140,14 @@
} catch (InvalidServiceContractException e) {
throw new ProcessingException(e);
}
-
-// ServiceContract contract = new JavaServiceContract();
-// Class<?> interfaceType = field.getType();
-// String interfaceName = getBaseName(interfaceType);
-// contract.setInterfaceName(interfaceName);
-// contract.setInterfaceClass(interfaceType);
reference.setServiceContract(contract);
type.getReferences().put(name, reference);
-// try {
-// implService.processCallback(interfaceType, contract);
-// } catch (IllegalCallbackException e) {
-// throw new ProcessingException(e);
-// }
-
}
- public void visitConstructor(CompositeComponent parent, Constructor<?> constructor,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context) throws ProcessingException {
+ public <T> void visitConstructor(CompositeComponent parent, Constructor<T> constructor,
+ PojoComponentType<JavaMappedService, JavaMappedReference,
+ JavaMappedProperty<?>> type,
+ DeploymentContext context) throws ProcessingException {
}
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ScopeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ScopeProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ScopeProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ScopeProcessor.java Sat Sep 9 22:48:45 2006
@@ -37,7 +37,7 @@
*/
public class ScopeProcessor extends ImplementationProcessorExtension {
- public void visitClass(CompositeComponent parent, Class<?> clazz,
+ public <T> void visitClass(CompositeComponent parent, Class<T> clazz,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context)
throws ProcessingException {
Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ServiceProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ServiceProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/implementation/processor/ServiceProcessor.java Sat Sep 9 22:48:45 2006
@@ -54,9 +54,9 @@
this.implService = implService;
}
- public void visitClass(CompositeComponent parent, Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context) throws ProcessingException {
+ public <T> void visitClass(CompositeComponent parent, Class<T> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context) throws ProcessingException {
org.osoa.sca.annotations.Service annotation = clazz.getAnnotation(org.osoa.sca.annotations.Service.class);
if (annotation == null) {
// scan intefaces for remotable
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/java/JavaComponentBuilderTestCase.java Sat Sep 9 22:48:45 2006
@@ -20,6 +20,7 @@
import java.util.HashMap;
import java.util.Map;
+import java.lang.reflect.Constructor;
import org.apache.tuscany.spi.component.AtomicComponent;
import org.apache.tuscany.spi.component.CompositeComponent;
@@ -69,7 +70,8 @@
sourceServiceDefinition.setServiceContract(sourceContract);
sourceType.add(sourceServiceDefinition);
- sourceType.setConstructorDefinition(new ConstructorDefinition(SourceImpl.class.getConstructor((Class[]) null)));
+ Constructor<SourceImpl> constructor = SourceImpl.class.getConstructor((Class[]) null);
+ sourceType.setConstructorDefinition(new ConstructorDefinition<SourceImpl>(constructor));
JavaImplementation sourceImpl = new JavaImplementation();
sourceImpl.setComponentType(sourceType);
sourceImpl.setImplementationClass(SourceImpl.class);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorAutowireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorAutowireTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorAutowireTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorAutowireTestCase.java Sat Sep 9 22:48:45 2006
@@ -43,7 +43,7 @@
public void testAutowire() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(Bar.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(Bar.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getReferences().get("myRef"));
}
@@ -51,7 +51,7 @@
public void testNamesOnConstructor() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(Bar.class, Bar.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(Bar.class, Bar.class);
processor.visitConstructor(null, ctor, type, null);
assertEquals(2, type.getConstructorDefinition().getInjectionNames().size());
assertNotNull(type.getReferences().get("myRef1"));
@@ -61,7 +61,7 @@
public void testNoName() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo2.class.getConstructor(Bar.class);
+ Constructor<Foo2> ctor = Foo2.class.getConstructor(Bar.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getReferences().get(Bar.class.getName()));
}
@@ -69,7 +69,7 @@
public void testInvalidNumberOfNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(Bar.class, Bar.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(Bar.class, Bar.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -81,7 +81,7 @@
public void testNoMatchingNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(List.class, List.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(List.class, List.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -96,7 +96,7 @@
public void testRandomAnnotation() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo3.class.getConstructor(String.class, String.class);
+ Constructor<Foo3> ctor = Foo3.class.getConstructor(String.class, String.class);
processor.visitConstructor(null, ctor, type, null);
assertEquals(1, type.getProperties().size());
assertNotNull(type.getProperties().get("prop1"));
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorExtensibilityTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorExtensibilityTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorExtensibilityTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorExtensibilityTestCase.java Sat Sep 9 22:48:45 2006
@@ -43,7 +43,7 @@
public void testProcessFirst() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor1 = Foo.class.getConstructor(String.class, String.class);
+ Constructor<Foo> ctor1 = Foo.class.getConstructor(String.class, String.class);
processor.visitConstructor(null, ctor1, type, null);
assertEquals("foo", type.getConstructorDefinition().getInjectionNames().get(0));
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorProcessorTestCase.java Sat Sep 9 22:48:45 2006
@@ -49,7 +49,7 @@
public void testConstructorAnnotation() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor1 = Foo.class.getConstructor(String.class);
+ Constructor<Foo> ctor1 = Foo.class.getConstructor(String.class);
processor.visitConstructor(null, ctor1, type, null);
assertEquals("foo", type.getConstructorDefinition().getInjectionNames().get(0));
}
@@ -57,7 +57,7 @@
public void testNoAnnotation() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor1 = NoAnnotation.class.getConstructor();
+ Constructor<NoAnnotation> ctor1 = NoAnnotation.class.getConstructor();
processor.visitConstructor(null, ctor1, type, null);
assertNull(type.getConstructorDefinition());
}
@@ -65,7 +65,7 @@
public void testBadAnnotation() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor1 = BadAnnotation.class.getConstructor(String.class, Foo.class);
+ Constructor<BadAnnotation> ctor1 = BadAnnotation.class.getConstructor(String.class, Foo.class);
try {
processor.visitConstructor(null, ctor1, type, null);
fail();
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorPropertyTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorPropertyTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorPropertyTestCase.java Sat Sep 9 22:48:45 2006
@@ -42,7 +42,7 @@
public void testProperty() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(String.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(String.class);
processor.visitConstructor(null, ctor, type, null);
JavaMappedProperty<?> property = type.getProperties().get("myProp");
assertTrue(property.isRequired());
@@ -52,7 +52,7 @@
public void testTwoPropertiesSameType() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(String.class, String.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(String.class, String.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getProperties().get("myProp1"));
assertNotNull(type.getProperties().get("myProp2"));
@@ -61,7 +61,7 @@
public void testDuplicateProperty() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(String.class, String.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(String.class, String.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -73,7 +73,7 @@
public void testNoName() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(String.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(String.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -85,7 +85,7 @@
public void testNamesOnConstructor() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(Integer.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(Integer.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getProperties().get("myProp"));
}
@@ -93,7 +93,7 @@
public void testInvalidNumberOfNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(Integer.class, Integer.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(Integer.class, Integer.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -105,7 +105,7 @@
public void testNoMatchingNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(List.class, List.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(List.class, List.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorReferenceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorReferenceTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorReferenceTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/ConstructorReferenceTestCase.java Sat Sep 9 22:48:45 2006
@@ -41,7 +41,7 @@
public void testReference() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ConstructorReferenceTestCase.Foo.class.getConstructor(String.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(String.class);
processor.visitConstructor(null, ctor, type, null);
JavaMappedReference reference = type.getReferences().get("myRef");
assertTrue(reference.isRequired());
@@ -51,7 +51,7 @@
public void testTwoReferencesSameType() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(String.class, String.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(String.class, String.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getReferences().get("myRef1"));
assertNotNull(type.getReferences().get("myRef2"));
@@ -60,7 +60,7 @@
public void testDuplicateProperty() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ConstructorReferenceTestCase.BadFoo.class.getConstructor(String.class, String.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(String.class, String.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -72,7 +72,7 @@
public void testNoName() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ConstructorReferenceTestCase.BadFoo.class.getConstructor(String.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(String.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -84,7 +84,7 @@
public void testNamesOnConstructor() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(Integer.class);
+ Constructor<Foo> ctor = Foo.class.getConstructor(Integer.class);
processor.visitConstructor(null, ctor, type, null);
assertNotNull(type.getReferences().get("myRef"));
}
@@ -92,7 +92,7 @@
public void testInvalidNumberOfNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(Integer.class, Integer.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(Integer.class, Integer.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
@@ -104,7 +104,7 @@
public void testNoMatchingNames() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = BadFoo.class.getConstructor(List.class, List.class);
+ Constructor<BadFoo> ctor = BadFoo.class.getConstructor(List.class, List.class);
try {
processor.visitConstructor(null, ctor, type, null);
fail();
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeuristicPojoProcessorTestCase.java Sat Sep 9 22:48:45 2006
@@ -51,12 +51,11 @@
/**
* Verifies a single service interface is computed when only one interface is implemented
*/
- @SuppressWarnings("unchecked")
public void testSingleInterface() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = SingleInterfaceImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<SingleInterfaceImpl> ctor = SingleInterfaceImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceImpl>(ctor));
processor.visitEnd(null, SingleInterfaceImpl.class, type, null);
assertEquals(1, type.getServices().size());
assertEquals(PropertyInterface.class,
@@ -69,12 +68,12 @@
/**
* Verifies property and reference setters are computed
*/
- @SuppressWarnings("unchecked")
public void testPropertyReference() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = SingleInterfaceWithPropertyReferenceImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<SingleInterfaceWithPropertyReferenceImpl> ctor =
+ SingleInterfaceWithPropertyReferenceImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceWithPropertyReferenceImpl>(ctor));
processor.visitEnd(null, SingleInterfaceWithPropertyReferenceImpl.class, type, null);
assertEquals(1, type.getServices().size());
assertEquals(Interface1.class,
@@ -89,12 +88,11 @@
/**
* Verifies that a property setter is not introspected if an analogous operation is in the service interface
*/
- @SuppressWarnings("unchecked")
public void testPropertySetterInInterface() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = SingleInterfaceImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<SingleInterfaceImpl> ctor = SingleInterfaceImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<SingleInterfaceImpl>(ctor));
processor.visitEnd(null, SingleInterfaceImpl.class, type, null);
assertEquals(0, type.getProperties().size());
}
@@ -102,12 +100,11 @@
/**
* Verifies that a reference setter is not introspected if an analogous operation is in the service interface
*/
- @SuppressWarnings("unchecked")
public void testReferenceSetterInInterface() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = RefInterfaceImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<RefInterfaceImpl> ctor = RefInterfaceImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<RefInterfaceImpl>(ctor));
processor.visitEnd(null, RefInterfaceImpl.class, type, null);
assertEquals(0, type.getReferences().size());
}
@@ -115,12 +112,11 @@
/**
* Verifies collection generic types or array types are introspected as references according to spec rules
*/
- @SuppressWarnings("unchecked")
public void testReferenceCollectionType() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ReferenceCollectionImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<ReferenceCollectionImpl> ctor = ReferenceCollectionImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<ReferenceCollectionImpl>(ctor));
processor.visitEnd(null, ReferenceCollectionImpl.class, type, null);
assertEquals(0, type.getProperties().size());
assertEquals(4, type.getReferences().size());
@@ -129,12 +125,11 @@
/**
* Verifies collection generic types or array types are introspected as properties according to spec rules
*/
- @SuppressWarnings("unchecked")
public void testPropertyCollectionType() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = PropertyCollectionImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<PropertyCollectionImpl> ctor = PropertyCollectionImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<PropertyCollectionImpl>(ctor));
processor.visitEnd(null, PropertyCollectionImpl.class, type, null);
assertEquals(0, type.getReferences().size());
assertEquals(4, type.getProperties().size());
@@ -143,23 +138,21 @@
/**
* Verifies references are calculated when the type marked with is @Remotable
*/
- @SuppressWarnings("unchecked")
public void testRemotableRef() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = RemotableRefImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<RemotableRefImpl> ctor = RemotableRefImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<RemotableRefImpl>(ctor));
processor.visitEnd(null, RemotableRefImpl.class, type, null);
assertEquals(2, type.getReferences().size());
assertEquals(0, type.getProperties().size());
}
- @SuppressWarnings("unchecked")
public void testParentInterface() throws ProcessingException, NoSuchMethodException {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Child.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<Child> ctor = Child.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<Child>(ctor));
processor.visitEnd(null, Child.class, type, null);
assertTrue(type.getServices().containsKey("HeuristicPojoProcessorTestCase$Interface1"));
}
@@ -186,22 +179,20 @@
assertEquals(1, type.getServices().size());
}
- @SuppressWarnings("unchecked")
public void testProtectedRemotableRefField() throws ProcessingException, NoSuchMethodException {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ProtectedRemotableRefFieldImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<ProtectedRemotableRefFieldImpl> ctor = ProtectedRemotableRefFieldImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<ProtectedRemotableRefFieldImpl>(ctor));
processor.visitEnd(null, ProtectedRemotableRefFieldImpl.class, type, null);
assertNotNull(type.getReferences().get("otherRef"));
}
- @SuppressWarnings("unchecked")
public void testProtectedRemotableRefMethod() throws ProcessingException, NoSuchMethodException {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = ProtectedRemotableRefMethodImpl.class.getConstructor();
- type.setConstructorDefinition(new ConstructorDefinition(ctor));
+ Constructor<ProtectedRemotableRefMethodImpl> ctor = ProtectedRemotableRefMethodImpl.class.getConstructor();
+ type.setConstructorDefinition(new ConstructorDefinition<ProtectedRemotableRefMethodImpl>(ctor));
processor.visitEnd(null, ProtectedRemotableRefMethodImpl.class, type, null);
assertNotNull(type.getReferences().get("otherRef"));
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/implementation/processor/HeutisticExtensibleConstructorTestCase.java Sat Sep 9 22:48:45 2006
@@ -44,12 +44,11 @@
/**
* Verifies heuristic processing can be called priot to an extension annotation processors being called.
*/
- @SuppressWarnings("unchecked")
public void testBarAnnotationProcessedFirst() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo.class.getConstructor(String.class, String.class);
- ConstructorDefinition definition = new ConstructorDefinition(ctor);
+ Constructor<Foo> ctor = Foo.class.getConstructor(String.class, String.class);
+ ConstructorDefinition<Foo> definition = new ConstructorDefinition<Foo>(ctor);
type.setConstructorDefinition(definition);
JavaMappedProperty property = new JavaMappedProperty();
property.setName("myBar");
@@ -90,12 +89,11 @@
* extension parameter in a middle position. Specifically, verifies that the heuristic processor updates injection
* names and preserves their ordering.
*/
- @SuppressWarnings("unchecked")
public void testBarAnnotationProcessedFirstInMiddle() throws Exception {
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
- Constructor ctor = Foo2.class.getConstructor(String.class, String.class, String.class);
- ConstructorDefinition definition = new ConstructorDefinition(ctor);
+ Constructor<Foo2> ctor = Foo2.class.getConstructor(String.class, String.class, String.class);
+ ConstructorDefinition<Foo2> definition = new ConstructorDefinition<Foo2>(ctor);
type.setConstructorDefinition(definition);
// insert placeholder for first param, which would be done by a processor
definition.getInjectionNames().add("");
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/java/builder/JavaBuilderPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/java/builder/JavaBuilderPropertyTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/java/builder/JavaBuilderPropertyTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/java/builder/JavaBuilderPropertyTestCase.java Sat Sep 9 22:48:45 2006
@@ -62,7 +62,7 @@
property.setDefaultValueFactory(new SingletonObjectFactory<String>("foo"));
property.setMember(JavaBuilderPropertyTestCase.Foo.class.getMethod("setTest", String.class));
type.add(property);
- type.setConstructorDefinition(new ConstructorDefinition(Foo.class.getConstructor((Class[])null)));
+ type.setConstructorDefinition(new ConstructorDefinition<Foo>(Foo.class.getConstructor((Class[])null)));
type.setImplementationScope(Scope.STATELESS);
JavaImplementation impl = new JavaImplementation();
impl.setComponentType(type);
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/integration/implementation/system/builder/SystemBuilderPropertyTestCase.java Sat Sep 9 22:48:45 2006
@@ -53,7 +53,7 @@
SystemComponentBuilder builder = new SystemComponentBuilder();
PojoComponentType<ServiceDefinition, ReferenceDefinition, JavaMappedProperty<?>> type =
new PojoComponentType<ServiceDefinition, ReferenceDefinition, JavaMappedProperty<?>>();
- type.setConstructorDefinition(new ConstructorDefinition(Foo.class.getConstructor((Class[])null)));
+ type.setConstructorDefinition(new ConstructorDefinition<Foo>(Foo.class.getConstructor((Class[])null)));
JavaMappedProperty<String> property = new JavaMappedProperty<String>();
property.setName("test");
property.setDefaultValueFactory(new SingletonObjectFactory<String>("foo"));
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/StAXLoaderRegistryImplTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/StAXLoaderRegistryImplTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/StAXLoaderRegistryImplTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/loader/StAXLoaderRegistryImplTestCase.java Sat Sep 9 22:48:45 2006
@@ -22,74 +22,90 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jmock.Mock;
-import org.jmock.MockObjectTestCase;
-
-import org.apache.tuscany.core.deployer.RootDeploymentContext;
+import org.apache.tuscany.spi.component.CompositeComponent;
import org.apache.tuscany.spi.deployer.DeploymentContext;
import org.apache.tuscany.spi.loader.LoaderException;
import org.apache.tuscany.spi.loader.StAXElementLoader;
import org.apache.tuscany.spi.loader.UnrecognizedElementException;
import org.apache.tuscany.spi.model.ModelObject;
+import junit.framework.TestCase;
+import org.apache.tuscany.core.deployer.RootDeploymentContext;
+import org.easymock.classextension.EasyMock;
+
/**
* Verifies the default loader registry
*
* @version $Rev$ $Date$
*/
-@SuppressWarnings({"CastToIncompatibleInterface"})
-public class StAXLoaderRegistryImplTestCase extends MockObjectTestCase {
+public class StAXLoaderRegistryImplTestCase extends TestCase {
private LoaderRegistryImpl registry;
private QName name;
- private Mock mockMonitor;
- private Mock mockLoader;
- private Mock mockReader;
+ private LoaderRegistryImpl.Monitor mockMonitor;
+ private StAXElementLoader<ModelObject> mockLoader;
+ private XMLStreamReader mockReader;
private DeploymentContext deploymentContext;
private ModelObject modelObject;
public void testLoaderRegistration() {
- mockMonitor.expects(once()).method("registeringLoader").with(eq(name));
- registry.registerLoader(name, (StAXElementLoader<ModelObject>) mockLoader.proxy());
+ mockMonitor.registeringLoader(EasyMock.eq(name));
+ EasyMock.replay(mockMonitor);
+ registry.registerLoader(name, mockLoader);
+ EasyMock.verify(mockMonitor);
}
public void testLoaderUnregistration() {
- mockMonitor.expects(once()).method("unregisteringLoader").with(eq(name));
- registry.unregisterLoader(name, (StAXElementLoader<ModelObject>) mockLoader.proxy());
+ mockMonitor.unregisteringLoader(EasyMock.eq(name));
+ EasyMock.replay(mockMonitor);
+ registry.unregisterLoader(name, (StAXElementLoader<ModelObject>) mockLoader);
+ EasyMock.verify(mockMonitor);
}
public void testSuccessfulDispatch() throws LoaderException, XMLStreamException {
- mockReader.expects(once()).method("getName").will(returnValue(name));
- mockMonitor.expects(once()).method("registeringLoader").with(eq(name));
- mockMonitor.expects(once()).method("elementLoad").with(eq(name));
- mockLoader.expects(once()).method("load").with(eq(null), eq(mockReader.proxy()), eq(deploymentContext))
- .will(returnValue(modelObject));
+ EasyMock.expect(mockReader.getName()).andReturn(name);
+ EasyMock.replay(mockReader);
+ mockMonitor.registeringLoader(EasyMock.eq(name));
+ mockMonitor.elementLoad(EasyMock.eq(name));
+ EasyMock.replay(mockMonitor);
+ EasyMock.expect(mockLoader.load(EasyMock.isA(CompositeComponent.class),
+ EasyMock.eq(mockReader),
+ EasyMock.eq(deploymentContext))).andReturn(modelObject);
+ EasyMock.replay(mockLoader);
+ registry.registerLoader(name, (StAXElementLoader<ModelObject>) mockLoader);
+ CompositeComponent parent = EasyMock.createNiceMock(CompositeComponent.class);
+ assertSame(modelObject, registry.load(parent, mockReader, deploymentContext));
+ EasyMock.verify(mockLoader);
+ EasyMock.verify(mockMonitor);
+ EasyMock.verify(mockReader);
- registry.registerLoader(name, (StAXElementLoader<ModelObject>) mockLoader.proxy());
- assertSame(modelObject, registry.load(null, (XMLStreamReader) mockReader.proxy(), deploymentContext));
}
public void testUnsuccessfulDispatch() throws LoaderException, XMLStreamException {
- mockReader.expects(once()).method("getName").will(returnValue(name));
- mockMonitor.expects(once()).method("elementLoad").with(eq(name));
-
+ EasyMock.expect(mockReader.getName()).andReturn(name);
+ EasyMock.replay(mockReader);
+ mockMonitor.elementLoad(EasyMock.eq(name));
+ EasyMock.replay(mockMonitor);
try {
- registry.load(null, (XMLStreamReader) mockReader.proxy(), deploymentContext);
+ registry.load(null, mockReader, deploymentContext);
fail();
} catch (UnrecognizedElementException e) {
assertSame(name, e.getElement());
}
+ EasyMock.verify(mockReader);
+ EasyMock.verify(mockMonitor);
}
+ @SuppressWarnings("unchecked")
protected void setUp() throws Exception {
super.setUp();
name = new QName("http://mock", "test");
deploymentContext = new RootDeploymentContext(null, null, null, null);
registry = new LoaderRegistryImpl();
- mockMonitor = mock(LoaderRegistryImpl.Monitor.class);
- registry.setMonitor((LoaderRegistryImpl.Monitor) mockMonitor.proxy());
+ mockMonitor = EasyMock.createMock(LoaderRegistryImpl.Monitor.class);
+ registry.setMonitor(mockMonitor);
- mockLoader = mock(StAXElementLoader.class);
- mockReader = mock(XMLStreamReader.class);
+ mockLoader = EasyMock.createMock(StAXElementLoader.class);
+ mockReader = EasyMock.createMock(XMLStreamReader.class);
modelObject = new ModelObject() {
};
}
Modified: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/work/jsr237/workmanager/ThreadPoolWorkManagerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/work/jsr237/workmanager/ThreadPoolWorkManagerTestCase.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/work/jsr237/workmanager/ThreadPoolWorkManagerTestCase.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/services/work/jsr237/workmanager/ThreadPoolWorkManagerTestCase.java Sat Sep 9 22:48:45 2006
@@ -41,7 +41,7 @@
final CountDownLatch latch = new CountDownLatch(1);
Work work = createMock(Work.class);
work.run();
- expectLastCall().andStubAnswer(new IAnswer() {
+ expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
latch.countDown();
return null;
@@ -64,7 +64,7 @@
replay(listener);
Work work = createMock(Work.class);
work.run();
- expectLastCall().andStubAnswer(new IAnswer() {
+ expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
latch.countDown();
return null;
@@ -84,7 +84,7 @@
listener.workAccepted(isA(WorkEvent.class));
listener.workStarted(isA(WorkEvent.class));
listener.workCompleted(isA(WorkEvent.class));
- expectLastCall().andStubAnswer(new IAnswer() {
+ expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
latch2.countDown();
return null;
@@ -93,7 +93,7 @@
replay(listener);
Work work = createMock(Work.class);
work.run();
- expectLastCall().andStubAnswer(new IAnswer() {
+ expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
latch.await();
return null;
@@ -115,7 +115,7 @@
replay(listener);
Work work = createMock(Work.class);
work.run();
- expectLastCall().andStubAnswer(new IAnswer() {
+ expectLastCall().andStubAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
latch.countDown();
throw new RuntimeException();
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessor.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessor.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessor.java Sat Sep 9 22:48:45 2006
@@ -46,8 +46,8 @@
* @param context the current deployment context
* @throws ProcessingException if an error is encountered while processing metadata
*/
- void visitClass(CompositeComponent parent,
- Class<?> clazz,
+ <T> void visitClass(CompositeComponent parent,
+ Class<T> clazz,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException;
@@ -60,8 +60,8 @@
* @param context the current deployment context
* @throws ProcessingException if an error is encountered while processing metadata
*/
- void visitSuperClass(CompositeComponent parent,
- Class<?> clazz,
+ <T> void visitSuperClass(CompositeComponent parent,
+ Class<T> clazz,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException;
@@ -90,8 +90,8 @@
* @param context the current deployment context
* @throws ProcessingException if an error is encountered while processing metadata
*/
- void visitConstructor(CompositeComponent parent,
- Constructor<?> constructor,
+ <T> void visitConstructor(CompositeComponent parent,
+ Constructor<T> constructor,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context)
throws ProcessingException;
@@ -120,8 +120,8 @@
* @param context the current deployment context
* @throws ProcessingException if an error is encountered while processing metadata
*/
- void visitEnd(CompositeComponent parent,
- Class<?> clazz,
+ <T> void visitEnd(CompositeComponent parent,
+ Class<T> clazz,
PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
DeploymentContext context) throws ProcessingException;
Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessorExtension.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessorExtension.java?view=diff&rev=441912&r1=441911&r2=441912
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessorExtension.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/implementation/java/ImplementationProcessorExtension.java Sat Sep 9 22:48:45 2006
@@ -52,15 +52,15 @@
registry.unregisterProcessor(this);
}
- public void visitClass(CompositeComponent parent, Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context)
+ public <T> void visitClass(CompositeComponent parent, Class<T> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context)
throws ProcessingException {
}
- public void visitSuperClass(CompositeComponent parent, Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context)
+ public <T> void visitSuperClass(CompositeComponent parent, Class<T> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context)
throws ProcessingException {
}
@@ -70,9 +70,9 @@
throws ProcessingException {
}
- public void visitConstructor(CompositeComponent parent, Constructor<?> constructor,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context)
+ public <T> void visitConstructor(CompositeComponent parent, Constructor<T> constructor,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context)
throws ProcessingException {
}
@@ -81,9 +81,9 @@
DeploymentContext context) throws ProcessingException {
}
- public void visitEnd(CompositeComponent parent, Class<?> clazz,
- PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
- DeploymentContext context) throws ProcessingException {
+ public <T> void visitEnd(CompositeComponent parent, Class<T> clazz,
+ PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type,
+ DeploymentContext context) throws ProcessingException {
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org