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/10/27 19:29:00 UTC
svn commit: r468467 -
/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java
Author: jmarino
Date: Fri Oct 27 10:29:00 2006
New Revision: 468467
URL: http://svn.apache.org/viewvc?view=rev&rev=468467
Log:
add @Resource annotation
Added:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java (with props)
Added: incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java?view=auto&rev=468467
==============================================================================
--- incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java (added)
+++ incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java Fri Oct 27 10:29:00 2006
@@ -0,0 +1,49 @@
+/*
+ * 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.osoa.sca.annotations;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Annotation used to indicate a resource should be provided to an implementation by the runtime.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Resource {
+
+ /**
+ * Denotes the name of the resource declared by the implementation.
+ */
+ public String name() default "";
+
+ /**
+ * Denotes if the resource is optional
+ */
+ public boolean optional() default false;
+
+ /**
+ * Denotes the default name of the resource provided by the runtime environment.
+ */
+ public String mappedName() default "";
+}
Propchange: incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Resource.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org