Package: org.codehaus.groovy.reflection

## [Java] Class ClassLoaderForClassArtifacts

- org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts

-     public class ClassLoaderForClassArtifacts
      extends ClassLoader

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `SoftReference<Class>` | `klazz` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ClassLoaderForClassArtifacts(Class klazz)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `createClassName(Method method)`
    `` | `public String` | `createClassName(String methodName)`
    `` | `public Class` | `define(String name, byte[] bytes)`
    `` | `public Constructor` | `defineClassAndGetConstructor(String name, byte[] bytes, Class<?> parameterTypes)` Defines a class from bytecode and returns a constructor matching `parameterTypes`.
    `` | `public Class` | `loadClass(String name)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ClassLoader` | `clearAssertionStatus, equals, getClass, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, hashCode, isRegisteredAsParallelCapable, loadClass, notify, notifyAll, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, toString, wait, wait, wait`

- - ### Field Detail

    - #### public final SoftReference<Class> klazz

  - ### Constructor Detail

    - #### public ClassLoaderForClassArtifacts(Class klazz)

  - ### Method Detail

    - #### public String createClassName(Method method)

    - #### public String createClassName(String methodName)

    - #### public Class define(String name, byte[] bytes)

    - #### public Constructor defineClassAndGetConstructor(String name, byte[] bytes, Class<?> parameterTypes)

      Defines a class from bytecode and returns a constructor matching `parameterTypes`.

      Parameters:
        `name` - the binary name of the class to define
        `bytes` - the class file bytes
        `parameterTypes` - the constructor parameter types to look up
      Returns:
        the matching constructor, or `null` if definition or lookup fails

    - #### public Class loadClass(String name)