From 9425990f532b1152c2d73db96c0f07ef5216a3d1 Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 12 Nov 2009 00:43:48 +0000 Subject: Moving 2.x contribs git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835178 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/pojo/JavaConstructor.java | 42 ----- .../org/apache/tuscany/sca/pojo/JavaElement.java | 92 ---------- .../org/apache/tuscany/sca/pojo/JavaFactory.java | 82 --------- .../org/apache/tuscany/sca/pojo/JavaParameter.java | 29 --- .../org/apache/tuscany/sca/pojo/JavaResource.java | 65 ------- .../tuscany/sca/pojo/impl/JavaConstructorImpl.java | 54 ------ .../tuscany/sca/pojo/impl/JavaElementImpl.java | 194 --------------------- .../tuscany/sca/pojo/impl/JavaFactoryImpl.java | 74 -------- .../tuscany/sca/pojo/impl/JavaParameterImpl.java | 37 ---- .../tuscany/sca/pojo/impl/JavaResourceImpl.java | 63 ------- .../org.apache.tuscany.sca.pojo.JavaFactory | 20 --- 11 files changed, 752 deletions(-) delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaConstructor.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaElement.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaFactory.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaParameter.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaResource.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaConstructorImpl.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaElementImpl.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaFactoryImpl.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaParameterImpl.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaResourceImpl.java delete mode 100644 java/sca-contrib/modules/implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.pojo.JavaFactory (limited to 'java/sca-contrib/modules/implementation-pojo/src') diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaConstructor.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaConstructor.java deleted file mode 100644 index 5f81353606..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaConstructor.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo; - -import java.lang.reflect.Constructor; - - -/** - * Hold injection information for the constructor used to instantiate a - * component implementation instance - * - * @version $Rev$ $Date$ - */ -public interface JavaConstructor { - - /** - * @return the constructor - */ - Constructor getConstructor(); - - /** - * @return the parameters - */ - JavaParameter[] getParameters(); - -} \ No newline at end of file diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaElement.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaElement.java deleted file mode 100644 index 19d452d07f..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaElement.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo; - -import java.lang.annotation.Annotation; -import java.lang.annotation.ElementType; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Type; - - -/** - * This class represents a java element such as a Package, Class, Constructor, - * Field, Method or Parameter. - * - * @version $Rev$ $Date$ - */ -public interface JavaElement { - - /** - * @return the anchor - */ - AnnotatedElement getAnchor(); - - /** - * @return the elementType - */ - ElementType getElementType(); - - /** - * @return the genericType - */ - Type getGenericType(); - - /** - * @return the index - */ - int getIndex(); - - /** - * @return the type - */ - Class getType(); - - /** - * @return the annotations - */ - Annotation[] getAnnotations(); - - /** - * Return a given annotation - * @param annotationType the annotation type - * @return the annotation - */ - T getAnnotation(Class annotationType); - - /** - * @return the name - */ - String getName(); - - /** - * @param name the name to set - */ - void setName(String name); - - /** - * @return the classifier - */ - Class getClassifer(); - - /** - * @param classifer the classifier to set - */ - void setClassifer(Class classifer); - -} \ No newline at end of file diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaFactory.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaFactory.java deleted file mode 100644 index 28375c86f8..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaFactory.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -/** - * Factory for the Java model used during introspection of java class/interfaces - * - * @version $Rev$ $Date$ - */ - -public interface JavaFactory { - - /** - * Create a model representing a java constructor - * @param clazz - * @return the java constructor - */ - JavaConstructor createJavaConstructor(Constructor constructor); - - /** - * Create model representing a java class - * @param clazz the class - * @return the java element representing the class - */ - JavaElement createJavaElement(Class clazz); - - /** - * Create a model representing a java property - * @param field the property - * @return the java element representing the property - */ - JavaElement createJavaElement(Field field); - - /** - * Create a model representing a java constructor - * @param constructor the constructor - * @param index the constructor position - * @return the java element representing the constructor - */ - JavaElement createJavaElement(Constructor constructor, int index); - - /** - * Create a model representing a java method - * @param method the method - * @param index the method position - * @return the java element representing the constructor - */ - JavaElement createJavaElement(Method method, int index); - - /** - * Create a model representing a java parameter - * @return the parameter - */ - JavaParameter createJavaParameter(Constructor constructor, int index); - - /** - * Create a model representing a java resource - * @return - */ - JavaResource createJavaResource(JavaElement element); - -} \ No newline at end of file diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaParameter.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaParameter.java deleted file mode 100644 index d5ded915db..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaParameter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo; - -/** - * This class represents a java element such as a Package, Class, Constructor, - * Field, Method or Parameter. - * - * @version $Rev$ $Date$ - */ -public interface JavaParameter extends JavaElement { - -} \ No newline at end of file diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaResource.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaResource.java deleted file mode 100644 index 38fbf75a71..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/JavaResource.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo; - - -/** - * A resource dependency declared by a Java component implementation - * - * @version $Rev$ $Date$ - */ -public interface JavaResource { - - /** - * The name of the resource - * - * @return the name of the resource - */ - String getName(); - - /** - * Returns the URI of the resource - * - * @return the URI of the resource - */ - String getMappedName(); - - /** - * Sets the resource URI - */ - void setMappedName(String mappedName); - - /** - * If true, the resource is optional - * - * @return true if the resource is optional - */ - boolean isOptional(); - - /** - * Sets whether the resource is optional - */ - void setOptional(boolean optional); - - /** - * @return the element - */ - JavaElement getElement(); - -} \ No newline at end of file diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaConstructorImpl.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaConstructorImpl.java deleted file mode 100644 index 36a87420ab..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaConstructorImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo.impl; - -import java.lang.reflect.Constructor; - -import org.apache.tuscany.sca.pojo.JavaConstructor; - - -/** - * Hold injection information for the constructor used to instantiate a - * component implementation instance - * - * @version $Rev$ $Date$ - */ -public class JavaConstructorImpl implements JavaConstructor { - private Constructor constructor; - private JavaParameterImpl[] parameters; - - public JavaConstructorImpl(Constructor constructor) { - this.constructor = constructor; - int size = constructor.getParameterTypes().length; - parameters = new JavaParameterImpl[size]; - for (int i = 0; i < size; i++) { - parameters[i] = new JavaParameterImpl(constructor, i); - } - } - - - public Constructor getConstructor() { - return constructor; - } - - - public JavaParameterImpl[] getParameters() { - return parameters; - } -} diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaElementImpl.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaElementImpl.java deleted file mode 100644 index fc3ca3238f..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaElementImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo.impl; - -import java.lang.annotation.Annotation; -import java.lang.annotation.ElementType; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Type; - -import org.apache.tuscany.sca.pojo.JavaElement; - -/** - * This class represents a java element such as a Package, Class, Constructor, - * Field, Method or Parameter. - * - * @version $Rev$ $Date$ - */ -public class JavaElementImpl implements JavaElement { - private AnnotatedElement anchor; - private ElementType elementType; - private Class type; - private Type genericType; - private int index = -1; - private String name; - private Class classifer; - - public JavaElementImpl(Class clazz) { - this.anchor = clazz; - this.elementType = ElementType.TYPE; - this.type = clazz; - this.genericType = clazz; - this.name = clazz.getName(); - } - - public JavaElementImpl(Field field) { - this.anchor = field; - this.elementType = ElementType.FIELD; - this.type = field.getType(); - this.genericType = field.getGenericType(); - this.name = field.getName(); - } - - public JavaElementImpl(Constructor constructor, int index) { - this.anchor = constructor; - this.elementType = ElementType.PARAMETER; - this.type = constructor.getParameterTypes()[index]; - this.genericType = constructor.getGenericParameterTypes()[index]; - this.index = index; - this.name = ""; - } - - public JavaElementImpl(Method method, int index) { - this.anchor = method; - this.elementType = ElementType.PARAMETER; - this.type = method.getParameterTypes()[index]; - this.genericType = method.getGenericParameterTypes()[index]; - this.index = index; - this.name = ""; - } - - /** - * For testing purpose - * - * @param name - * @param type - * @param classifer TODO - * @param elementType - */ - public JavaElementImpl(String name, Class type, Class classifer) { - super(); - this.type = type; - this.name = name; - this.classifer = classifer; - } - - public AnnotatedElement getAnchor() { - return anchor; - } - - public ElementType getElementType() { - return elementType; - } - - public Type getGenericType() { - return genericType; - } - - public int getIndex() { - return index; - } - - public Class getType() { - return type; - } - - public Annotation[] getAnnotations() { - if (elementType == ElementType.PARAMETER) { - if (anchor instanceof Method) { - // We only care about the method-level annotations - return ((Method)anchor).getAnnotations(); - } - if (anchor instanceof Constructor) { - return ((Constructor)anchor).getParameterAnnotations()[index]; - } - } - return anchor.getAnnotations(); - } - - public T getAnnotation(Class annotationType) { - for (Annotation a : getAnnotations()) { - if (a.annotationType() == annotationType) { - return annotationType.cast(a); - } - } - return null; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Class getClassifer() { - return classifer; - } - - public void setClassifer(Class classifer) { - this.classifer = classifer; - } - - - @Override - public String toString() { - return anchor.toString() + (elementType == ElementType.PARAMETER ? "[" + index + "]" : ""); - } - - @Override - public int hashCode() { - final int PRIME = 31; - int result = 1; - result = PRIME * result + ((anchor == null) ? 0 : anchor.hashCode()); - result = PRIME * result + index; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final JavaElementImpl other = (JavaElementImpl)obj; - if (anchor == null) { - if (other.anchor != null) { - return false; - } - } else if (!anchor.equals(other.anchor)) { - return false; - } - if (index != other.index) { - return false; - } - return true; - } - -} diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaFactoryImpl.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaFactoryImpl.java deleted file mode 100644 index d1b7d4c5ad..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaFactoryImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo.impl; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import org.apache.tuscany.sca.pojo.JavaConstructor; -import org.apache.tuscany.sca.pojo.JavaElement; -import org.apache.tuscany.sca.pojo.JavaFactory; -import org.apache.tuscany.sca.pojo.JavaParameter; -import org.apache.tuscany.sca.pojo.JavaResource; - -/** - * Factory for the Java model used during introspection of java class/interfaces - * - * @version $Rev$ $Date$ - */ - -public class JavaFactoryImpl implements JavaFactory { - - public void JavaFactory() { - - } - - public JavaConstructor createJavaConstructor(Constructor constructor){ - return new JavaConstructorImpl(constructor); - } - - public JavaElement createJavaElement(Class clazz) { - return new JavaElementImpl(clazz); - } - - public JavaElement createJavaElement(Field field){ - return new JavaElementImpl(field); - - } - - public JavaElement createJavaElement(Constructor constructor, int index) { - return new JavaElementImpl(constructor, index); - - } - - public JavaElement createJavaElement(Method method, int index) { - return new JavaElementImpl(method, index); - } - - public JavaParameter createJavaParameter(Constructor constructor, int index) { - return new JavaParameterImpl(constructor, index); - } - - public JavaResource createJavaResource(JavaElement element) { - return new JavaResourceImpl(element); - } - -} - diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaParameterImpl.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaParameterImpl.java deleted file mode 100644 index 417644be14..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaParameterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo.impl; - -import java.lang.reflect.Constructor; - -import org.apache.tuscany.sca.pojo.JavaParameter; - -/** - * @version $Rev$ $Date$ - */ -public class JavaParameterImpl extends JavaElementImpl implements JavaParameter { - /** - * @param constructor - * @param index - */ - public JavaParameterImpl(Constructor constructor, int index) { - super(constructor, index); - } -} diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaResourceImpl.java b/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaResourceImpl.java deleted file mode 100644 index 5a36a21db8..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/java/org/apache/tuscany/sca/pojo/impl/JavaResourceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.pojo.impl; - -import org.apache.tuscany.sca.pojo.JavaElement; -import org.apache.tuscany.sca.pojo.JavaResource; - -/** - * A resource dependency declared by a Java component implementation - * - * @version $Rev$ $Date$ - */ -public class JavaResourceImpl implements JavaResource { - private JavaElement element; - private String mappedName; - private boolean optional; - - public JavaResourceImpl(JavaElement element) { - this.element = element; - } - - public String getName() { - return element.getName(); - } - - public String getMappedName() { - return mappedName; - } - - public void setMappedName(String mappedName) { - this.mappedName = mappedName; - } - - public boolean isOptional() { - return optional; - } - - public void setOptional(boolean optional) { - this.optional = optional; - } - - public JavaElement getElement() { - return element; - } - - -} diff --git a/java/sca-contrib/modules/implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.pojo.JavaFactory b/java/sca-contrib/modules/implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.pojo.JavaFactory deleted file mode 100644 index 5ed06a8dcd..0000000000 --- a/java/sca-contrib/modules/implementation-pojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.pojo.JavaFactory +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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. - - -# Implementation class for the java model factory -org.apache.tuscany.sca.pojo.impl.JavaFactoryImpl \ No newline at end of file -- cgit v1.2.3