[java-support] branch master updated: IDP-1047 Add an annotation to carry the parameter name.
Rod Widdowson
rdw at steadingsoftware.com
Mon Sep 19 12:23:02 EDT 2016
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=799ae50b372404dcc383f47f2bf92c05055338e7
The following commit(s) were added to refs/heads/master by this push:
new 799ae50 IDP-1047 Add an annotation to carry the parameter name.
799ae50 is described below
commit 799ae50b372404dcc383f47f2bf92c05055338e7
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Sep 19 15:59:13 2016 +0100
IDP-1047 Add an annotation to carry the parameter name.
https://issues.shibboleth.net/jira/browse/IDP-1047
---
.../java/support/annotation/ParameterName.java | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/annotation/ParameterName.java b/src/main/java/net/shibboleth/utilities/java/support/annotation/ParameterName.java
new file mode 100644
index 0000000..666ee15
--- /dev/null
+++ b/src/main/java/net/shibboleth/utilities/java/support/annotation/ParameterName.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID 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 net.shibboleth.utilities.java.support.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.annotation.Nonnull;
+
+/**
+ * The Name of the parameter (aimed at constructors). This allows IOC frameworks
+ * to inject parameters ino the constructor by name without the (java) name itself
+ * becoming part of the API (and allowing in Java 7) things to be compiled -nodebug.
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({ElementType.PARAMETER, })
+public @interface ParameterName {
+
+ /** The name for this parameter.
+ * @return the name.
+ */
+ @Nonnull public String name();
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list