You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2010/05/05 23:06:20 UTC

svn commit: r941487 - in /felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command: Descriptor.java Flag.java Option.java

Author: rickhall
Date: Wed May  5 21:06:19 2010
New Revision: 941487

URL: http://svn.apache.org/viewvc?rev=941487&view=rev
Log:
Add some basic support for descriptive info; this will likely need to
be improved in the future, but I need something for the next framework
release. (FELIX-2042)

Added:
    felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Descriptor.java
Modified:
    felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Flag.java
    felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Option.java

Added: felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Descriptor.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Descriptor.java?rev=941487&view=auto
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Descriptor.java (added)
+++ felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Descriptor.java Wed May  5 21:06:19 2010
@@ -0,0 +1,31 @@
+/*
+ * 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.osgi.service.command;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER})
+public @interface Descriptor
+{
+    String description();
+}
\ No newline at end of file

Modified: felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Flag.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Flag.java?rev=941487&r1=941486&r2=941487&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Flag.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Flag.java Wed May  5 21:06:19 2010
@@ -28,4 +28,5 @@ import java.lang.annotation.Target;
 public @interface Flag
 {
     String name();
+    String description() default "";
 }
\ No newline at end of file

Modified: felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Option.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Option.java?rev=941487&r1=941486&r2=941487&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Option.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/osgi/service/command/Option.java Wed May  5 21:06:19 2010
@@ -28,5 +28,6 @@ import java.lang.annotation.Target;
 public @interface Option
 {
     String name();
+    String description() default "";
     String dflt();
-}
+}
\ No newline at end of file