diff --git a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
index 21b772cf4..2d49e18bb 100644
--- a/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
+++ b/plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
@@ -158,18 +158,6 @@ public class Java8ClassFinder implements ClassFinder {
return infos != null && !infos.isEmpty();
}
- /**
- * Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
- *
- * The list will only contain entries of classes whose byte code matched the requirements
- * of last invoked find* method, but were unable to be loaded and included in the results.
- *
- * The list returned is unmodifiable. Once obtained, the returned list will be a live view of the
- * results from the last findAnnotated* method call.
- *
- * This method is not thread safe.
- * @return an unmodifiable live view of classes that could not be loaded in previous findAnnotated* call.
- */
public List getClassesNotLoaded() {
return Collections.unmodifiableList(classesNotLoaded);
}
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java
index aed9981c7..cf8fb9b56 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinder.java
@@ -8,10 +8,34 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
+/**
+ * ClassFinder searches the classpath of the specified ClassLoaderInterface for
+ * packages, classes, constructors, methods, or fields with specific annotations.
+ *
+ * For security reasons ASM is used to find the annotations. Classes are not
+ * loaded unless they match the requirements of a called findAnnotated* method.
+ * Once loaded, these classes are cached.
+ *
+ * The getClassesNotLoaded() method can be used immediately after any find*
+ * method to get a list of classes which matched the find requirements (i.e.
+ * contained the annotation), but were unable to be loaded.
+ */
public interface ClassFinder {
boolean isAnnotationPresent(Class extends Annotation> annotation);
+ /**
+ * Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
+ *
+ * The list will only contain entries of classes whose byte code matched the requirements
+ * of last invoked find* method, but were unable to be loaded and included in the results.
+ *
+ * The list returned is unmodifiable. Once obtained, the returned list will be a live view of the
+ * results from the last findAnnotated* method call.
+ *
+ * This method is not thread safe.
+ * @return an unmodifiable live view of classes that could not be loaded in previous findAnnotated* call.
+ */
List getClassesNotLoaded();
List findAnnotatedPackages(Class extends Annotation> annotation);
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java
index 28e47c22e..7998c3cfd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/ClassFinderFactory.java
@@ -1,9 +1,27 @@
+/*
+ * Copyright 2002-2003,2009 The Apache Software Foundation.
+ *
+ * Licensed 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 com.opensymphony.xwork2.util.finder;
import java.net.URL;
import java.util.Collection;
import java.util.Set;
+/**
+ * Allows create different ClassFinders which should help support different Java versions
+ */
public interface ClassFinderFactory {
ClassFinder buildClassFinder(ClassLoaderInterface classLoaderInterface, Collection urls, boolean extractBaseInterfaces, Set protocols, Test classNameFilter);
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
index 192196a6c..a80849bdd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
@@ -51,21 +51,6 @@ import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
-/**
- * ClassFinder searches the classpath of the specified ClassLoaderInterface for
- * packages, classes, constructors, methods, or fields with specific annotations.
- *
- * For security reasons ASM is used to find the annotations. Classes are not
- * loaded unless they match the requirements of a called findAnnotated* method.
- * Once loaded, these classes are cached.
- *
- * The getClassesNotLoaded() method can be used immediately after any find*
- * method to get a list of classes which matched the find requirements (i.e.
- * contained the annotation), but were unable to be loaded.
- *
- * @author David Blevins
- * @version $Rev$ $Date$
- */
public class DefaultClassFinder implements ClassFinder {
private static final Logger LOG = LoggerFactory.getLogger(DefaultClassFinder.class);
@@ -165,18 +150,6 @@ public class DefaultClassFinder implements ClassFinder {
return infos != null && !infos.isEmpty();
}
- /**
- * Returns a list of classes that could not be loaded in last invoked findAnnotated* method.
- *
- * The list will only contain entries of classes whose byte code matched the requirements
- * of last invoked find* method, but were unable to be loaded and included in the results.
- *
- * The list returned is unmodifiable. Once obtained, the returned list will be a live view of the
- * results from the last findAnnotated* method call.
- *
- * This method is not thread safe.
- * @return an unmodifiable live view of classes that could not be loaded in previous findAnnotated* call.
- */
public List getClassesNotLoaded() {
return Collections.unmodifiableList(classesNotLoaded);
}