play.classloading

## Class ApplicationClasses

- java.lang.Object
- - play.classloading.ApplicationClasses

    public class ApplicationClasses
    extends java.lang.Object

Application classes container.

### Nested Class Summary

Nested Classes
`static class` `ApplicationClasses.ApplicationClass` Represent a application class

### Constructor Summary

Constructors
Constructor and Description
`ApplicationClasses()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `add(ApplicationClasses.ApplicationClass applicationClass)` Put a new class to the cache.
`java.util.List<ApplicationClasses.ApplicationClass>` `all()` All loaded classes.
`void` `clear()` Clear the classes cache
`java.util.List<ApplicationClasses.ApplicationClass>` `getAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)` Retrieve all application classes with a specific annotation.
`ApplicationClasses.ApplicationClass` `getApplicationClass(java.lang.String name)` Get a class by name
`java.util.List<ApplicationClasses.ApplicationClass>` `getAssignableClasses(java.lang.Class<?> clazz)` Retrieve all application classes assignable to this class.
`static VirtualFile` `getJava(java.lang.String name)` Retrieve the corresponding source file for a given class name.
`boolean` `hasClass(java.lang.String name)` Does this class is already loaded ?
`void` `remove(ApplicationClasses.ApplicationClass applicationClass)` Remove a class from cache
`void` `remove(java.lang.String applicationClass)` Remove a class from cache
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ApplicationClasses

    public ApplicationClasses()

### Method Detail

#### clear

    public void clear()

Clear the classes cache

#### getApplicationClass

    public ApplicationClasses.ApplicationClass getApplicationClass(java.lang.String name)

Get a class by name

Parameters:
  `name` - The fully qualified class name
Returns:
  The ApplicationClass or null

#### getAssignableClasses

    public java.util.List<ApplicationClasses.ApplicationClass> getAssignableClasses(java.lang.Class<?> clazz)

Retrieve all application classes assignable to this class.

Parameters:
  `clazz` - The superclass, or the interface.
Returns:
  A list of application classes.

#### getAnnotatedClasses

    public java.util.List<ApplicationClasses.ApplicationClass> getAnnotatedClasses(java.lang.Class<? extends java.lang.annotation.Annotation> clazz)

Retrieve all application classes with a specific annotation.

Parameters:
  `clazz` - The annotation class.
Returns:
  A list of application classes.

#### all

    public java.util.List<ApplicationClasses.ApplicationClass> all()

All loaded classes.

Returns:
  All loaded classes

#### add

    public void add(ApplicationClasses.ApplicationClass applicationClass)

Put a new class to the cache.

Parameters:
  `applicationClass` - The class to add

#### remove

    public void remove(ApplicationClasses.ApplicationClass applicationClass)

Remove a class from cache

Parameters:
  `applicationClass` - The class to remove

#### remove

    public void remove(java.lang.String applicationClass)

Remove a class from cache

Parameters:
  `applicationClass` - The class name to remove

#### hasClass

    public boolean hasClass(java.lang.String name)

Does this class is already loaded ?

Parameters:
  `name` - The fully qualified class name
Returns:
  true if the class is loaded

#### getJava

    public static VirtualFile getJava(java.lang.String name)

Retrieve the corresponding source file for a given class name. It handles innerClass too !

Parameters:
  `name` - The fully qualified class name
Returns:
  The virtualFile if found

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`