JdkClassInfoProvider (EasyMock 5.5.0 API)
Date: 2024-11-17

org.easymock.internal.classinfoprovider

## Class JdkClassInfoProvider

- java.lang.Object
- - org.easymock.internal.classinfoprovider.JdkClassInfoProvider

- All Implemented Interfaces:
    ClassInfoProvider

      public class JdkClassInfoProvider
      extends Object
      implements ClassInfoProvider

  Provider to use when classes are from the JDK of is they have no package. In this case, we create the mock in the "org.easymock.mocks" package and in EasyMock class loader.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JdkClassInfoProvider()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> ClassLoader` | `classLoader(Class<T> toMock)` Returns the class loader where the mock should be created.
    `String` | `classPackage(Class<?> toMock)` Returns the package where the mock should be created.

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

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

- - ### Constructor Detail

    - #### JdkClassInfoProvider

          public JdkClassInfoProvider()

  - ### Method Detail

    - #### classPackage

          public String classPackage(Class<?> toMock)

      Description copied from interface: `ClassInfoProvider`
      Returns the package where the mock should be created.
      Specified by:
        `classPackage` in interface `ClassInfoProvider`
      Parameters:
        `toMock` - the class to mock
      Returns:
        the package name

    - #### classLoader

          public <T> ClassLoader classLoader(Class<T> toMock)

      Description copied from interface: `ClassInfoProvider`
      Returns the class loader where the mock should be created.
      Specified by:
        `classLoader` in interface `ClassInfoProvider`
      Type Parameters:
        `T` - type of the class to mock
      Parameters:
        `toMock` - the class to mock
      Returns:
        the class loader where the mock should be created

Copyright © 2001–2024 EasyMock contributors. All rights reserved.