Skip to content

Commit

Permalink
Moar Javadoc Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Jan 21, 2015
1 parent d26bbb1 commit 48d0f58
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
* <p/>
* 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.
* <p/>
* 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();

Expand Down

0 comments on commit 48d0f58

Please sign in to comment.