summaryrefslogtreecommitdiffstats
path: root/tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-30 12:18:56 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-30 12:18:56 +0000
commit7abf5a347d0f5dc9a54cd6c443daafae9f4976fc (patch)
tree99776d825d680d1f9ee4403336018ce9740b8be2 /tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java
parentb003942c4e5046a2a480d1db7d49f1936c4e0f6c (diff)
Re-tag 2.0-M4 RC1 release
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@831279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java')
-rw-r--r--tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java b/tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java
new file mode 100644
index 0000000000..5905946627
--- /dev/null
+++ b/tags/java/sca/2.0-M4-RC1/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Property.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a constructor parameter, field or method that is
+ * used to inject a configuration property value.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface Property {
+ /**
+ * The name of the property. If not specified then the name will be derived
+ * from the annotated field or method.
+ *
+ * @return the name of the property
+ */
+ String name() default "";
+
+ /**
+ * Indicates whether a value for the property must be provided.
+ *
+ * @return true if a value must be provided
+ */
+ boolean required() default true;
+}