creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1374637 - in /creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app: analysis/ load/
Date Sat, 18 Aug 2012 19:19:17 GMT
Author: rdonkin
Date: Sat Aug 18 19:19:16 2012
New Revision: 1374637

URL: http://svn.apache.org/viewvc?rev=1374637&view=rev
Log:
Small javadoc improvements, and code tiding based on checkstyle report

Added:
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java
  (with props)
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java
  (with props)
Modified:
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableClassPathResource.java
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileNameResource.java
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileResource.java
    creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableResourceFactory.java

Added: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java?rev=1374637&view=auto
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java
(added)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java
Sat Aug 18 19:19:16 2012
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/**
+ * Audits source against meta-data.
+ */
+package org.apache.creadur.whisker.app.analysis;

Propchange: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/analysis/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableClassPathResource.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableClassPathResource.java?rev=1374637&r1=1374636&r2=1374637&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableClassPathResource.java
(original)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableClassPathResource.java
Sat Aug 18 19:19:16 2012
@@ -26,7 +26,7 @@ import org.apache.creadur.whisker.app.St
 /**
  * Streams, on demand, the contents of a resource located on the class path.
  */
-public class StreamableClassPathResource extends StreamableResource {
+public final class StreamableClassPathResource extends StreamableResource {
 
     /**
      * The full name <strong>including path</strong>
@@ -41,7 +41,7 @@ public class StreamableClassPathResource
      * a resource on the class path,
      * not null
      */
-    public StreamableClassPathResource(String name) {
+    public StreamableClassPathResource(final String name) {
         super();
         this.name = name;
     }
@@ -58,13 +58,20 @@ public class StreamableClassPathResource
 
 
     /**
+     * Opens a resource on the classpath.
+     * @return not null
      * @see StreamableResource#open()
+     * @throws IOException when resource cannot be open
      */
     @Override
     public InputStream open() throws IOException {
         return getClass().getClassLoader().getResourceAsStream(name);
     }
 
+    /**
+     * Suitable for logging.
+     * @return a description
+     */
     @Override
     public String toString() {
         return "StreamableClassPathResource [name=" + name + "]";

Modified: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileNameResource.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileNameResource.java?rev=1374637&r1=1374636&r2=1374637&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileNameResource.java
(original)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileNameResource.java
Sat Aug 18 19:19:16 2012
@@ -14,7 +14,7 @@
  * "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. 
+ * under the License.
  */
 package org.apache.creadur.whisker.app.load;
 
@@ -26,24 +26,28 @@ import java.io.InputStream;
 
 import org.apache.creadur.whisker.app.StreamableResource;
 /**
- * Streams, on demand, the contents of a file identified by a full file name, 
+ * Streams, on demand, the contents of a file identified by a full file name,
  * including path.
  */
 public class StreamableFileNameResource extends StreamableResource {
-    /** The full file name, including path, of the resource to be streamed */
+    /**
+     * The full file name, including path,
+     * of the resource to be streamed.
+     */
     private final String fileName;
 
     /**
-     * Constructs an instance that streams the resource identified by name on demand
+     * Constructs an instance that streams
+     * the resource identified by name on demand.
      * @param fileName, full file name, including path, of the resource to be streamed
      * on demand, not null
      */
-    public StreamableFileNameResource(String fileName) {
+    public StreamableFileNameResource(final String fileName) {
         super();
         this.fileName = fileName;
     }
 
-    /**    
+    /**
      * Gets the file name of the resource to be streamed.
      * @return full file name, not null
      */
@@ -52,6 +56,8 @@ public class StreamableFileNameResource 
     }
 
     /**
+     * Opens the file as an input stream.
+     * @return not null
      * @see StreamableResource#open()
      */
     @Override
@@ -59,8 +65,12 @@ public class StreamableFileNameResource 
         return new BufferedInputStream(new FileInputStream(new File(fileName)));
     }
 
+    /**
+     * Suitable for logging.
+     * @return a description
+     */
     @Override
     public String toString() {
         return "StreamableFileNameResource [fileName=" + fileName + "]";
     }
-}
\ No newline at end of file
+}

Modified: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileResource.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileResource.java?rev=1374637&r1=1374636&r2=1374637&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileResource.java
(original)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableFileResource.java
Sat Aug 18 19:19:16 2012
@@ -14,7 +14,7 @@
  * "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. 
+ * under the License.
  */
 package org.apache.creadur.whisker.app.load;
 
@@ -31,19 +31,21 @@ import org.apache.creadur.whisker.app.St
  * Streams the contents of a file.
  */
 public class StreamableFileResource extends StreamableResource {
-    /** The file to be streamed */
+    /** The file to be streamed. */
     private final File file;
-    
+
     /**
      * Constructs an object that streams the file on demand.
      * @param file not null
      */
-    public StreamableFileResource(File file) {
+    public StreamableFileResource(final File file) {
         super();
         this.file = file;
     }
 
     /**
+     * Opens the file as an input stream.
+     * @return not null
      * @see StreamableResource#open()
      */
     @Override

Modified: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableResourceFactory.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableResourceFactory.java?rev=1374637&r1=1374636&r2=1374637&view=diff
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableResourceFactory.java
(original)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/StreamableResourceFactory.java
Sat Aug 18 19:19:16 2012
@@ -14,7 +14,7 @@
  * "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. 
+ * under the License.
  */
 package org.apache.creadur.whisker.app.load;
 
@@ -25,32 +25,35 @@ import org.apache.creadur.whisker.app.St
 /**
  * Conveniently builds {@link StreamableResource} implementations.
  */
-public class StreamableResourceFactory {
+public final class StreamableResourceFactory {
 
     /**
-     * Builds instance that streams, on demand, from resource on the class path.
+     * Builds instance that streams, on demand,
+     * from resource on the class path.
      * @param name full name, including path, of the resource not null
-     * @return an instance that streams, on demand, the given resource, 
+     * @return an instance that streams, on demand, the given resource,
      * not null
      */
     public StreamableResource streamFromClassPathResource(final String name) {
-        return new StreamableClassPathResource(name); 
+        return new StreamableClassPathResource(name);
     }
-    
+
     /**
-     * Builds instance that streams, on demand, from resource stored in the file system.
+     * Builds instance that streams, on demand,
+     * from resource stored in the file system.
      * @param fileName full name, including path, of the resource not null
-     * @return an instance that streams, on demand, the given resource, 
+     * @return an instance that streams, on demand, the given resource,
      * not null
      */
     public StreamableResource streamFromFileResource(final String fileName) {
         return new StreamableFileNameResource(fileName);
     }
-    
+
     /**
-     * Builds instance that streams, on demand, from resource stored in the file system.
+     * Builds instance that streams, on demand,
+     * from resource stored in the file system.
      * @param file a file storing the resource not null
-     * @return an instance that streams, on demand, the given resource, 
+     * @return an instance that streams, on demand, the given resource,
      * not null
      */
     public StreamableResource streamFromFileResource(final File file) {

Added: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java
URL: http://svn.apache.org/viewvc/creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java?rev=1374637&view=auto
==============================================================================
--- creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java
(added)
+++ creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java
Sat Aug 18 19:19:16 2012
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/**
+ * Ways to load resources.
+ */
+package org.apache.creadur.whisker.app.load;

Propchange: creadur/whisker/trunk/apache-whisker-app/src/main/java/org/apache/creadur/whisker/app/load/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message