From 48d0f58644387ec8475952d79cc4929ab73fb48e Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Wed, 21 Jan 2015 16:51:08 -0200 Subject: [PATCH] Moar Javadoc Improvements --- .../addon/projects/facets/ClassLoaderFacet.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ClassLoaderFacet.java b/projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ClassLoaderFacet.java index fa35efb299..2bdad7e1b7 100644 --- a/projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ClassLoaderFacet.java +++ b/projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ClassLoaderFacet.java @@ -7,9 +7,9 @@ package org.jboss.forge.addon.projects.facets; -import java.net.URL; import java.net.URLClassLoader; +import org.jboss.forge.addon.dependencies.Dependency; import org.jboss.forge.addon.projects.Project; import org.jboss.forge.addon.projects.ProjectFacet; @@ -21,11 +21,18 @@ public interface ClassLoaderFacet extends ProjectFacet { /** - * Returns a {@link URLClassLoader} that encompasses all {@link Dependency} instances on which this project depends and the built artifact from the project sources. This is the equivalent of class-loading the entire project classpath. - * - * WARNING: You *MUST* call {@link URLClassLoader#close()} when finished with this object. Failure to close this object upon completion will result in fatal memory leaks over time. If the scope of work is appropriate, consider using a try-with-resources block to encapsulate the operations and automatically clean up any ClassLoader resources. + * Returns a {@link URLClassLoader} that encompasses all {@link Dependency} instances on which this project depends. + * It also includes the compiled/fully built {@link PackagingFacet#getFinalArtifact()} from the project sources + * itself. This is the equivalent of class-loading the entire project classpath. *

- * IMPORTANT: You must also clean up and release any {@link Class} references that were produced by this {@link ClassLoader}. It is not enough to close this. Held {@link Class} references will keep the {@link ClassLoader} from being garbage collected. + * WARNING: You *MUST* call {@link URLClassLoader#close()} when finished with this object. Failure to close this + * object upon completion will result in fatal memory leaks over time. If the scope of work is appropriate, consider + * using a try-with-resources block to encapsulate the operations and automatically clean up any ClassLoader + * resources. + *

+ * IMPORTANT: You must also clean up and release any {@link Class} references that were produced by this + * {@link ClassLoader}. It is not enough to close this. Held {@link Class} references will keep the + * {@link ClassLoader} from being garbage collected. */ URLClassLoader getClassLoader();