org.firstinspires.ftc.robotcore.external

## Class ClassFactory

- java.lang.Object
- - org.firstinspires.ftc.robotcore.external.ClassFactory

-     public abstract class ClassFactory
      extends java.lang.Object

  `ClassFactory` provides a means by which various objects in the SDK may be logically instantiated without exposing their external class identities to user's programs.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `ClassFactory.InstanceHolder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassFactory()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `canCreateTFObjectDetector()` Return true if this device is compatible with Tensor Flow Object Detection, false otherwise.
    `abstract TFObjectDetector` | `createTFObjectDetector(TFObjectDetector.Parameters parameters, VuforiaLocalizer vuforiaLocalizer)` `createTFObjectDetector` returns an instance of the Tensor Flow object detector engine configured with the indicated set of parameters.
    `abstract VuforiaLocalizer` | `createVuforia(VuforiaLocalizer.Parameters parameters)` `createVuforia` returns an instance of the Vuforia localizer engine configured with the indicated set of parameters.
    `static VuforiaLocalizer` | `createVuforiaLocalizer(VuforiaLocalizer.Parameters parameters)` Deprecated. Use `createVuforia(VuforiaLocalizer.Parameters)` instead
    `abstract CameraManager` | `getCameraManager()` Returns a `CameraManager` which can be used to access the USB webcams attached to the robot controller.
    `static ClassFactory` | `getInstance()`

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

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

- - ### Constructor Detail

    - #### ClassFactory

          public ClassFactory()

  - ### Method Detail

    - #### getInstance

          public static ClassFactory getInstance()

    - #### createVuforia

          public abstract VuforiaLocalizer createVuforia(VuforiaLocalizer.Parameters parameters)

      `createVuforia` returns an instance of the Vuforia localizer engine configured with the indicated set of parameters.
      Parameters:
        `parameters` - the parameters used to configure the instance of the engine
      Returns:
        an instance of the Vuforia robot localization engine.
      See Also:
        `VuforiaLocalizer`, `Orientation`, vuforia.com

    - #### canCreateTFObjectDetector

          public abstract boolean canCreateTFObjectDetector()

      Return true if this device is compatible with Tensor Flow Object Detection, false otherwise.

    - #### createTFObjectDetector

          public abstract TFObjectDetector createTFObjectDetector(TFObjectDetector.Parameters parameters,
                                                                  VuforiaLocalizer vuforiaLocalizer)

      `createTFObjectDetector` returns an instance of the Tensor Flow object detector engine configured with the indicated set of parameters.
      Parameters:
        `parameters` - the parameters used to configure the instance of the engine
        `vuforiaLocalizer` - the VuforiaLocalizer that will be used to obtain camera frames
      Returns:
        an instance of the Tensor Flow object detector engine.
      See Also:
        `TFObjectDetector`

    - #### getCameraManager

          public abstract CameraManager getCameraManager()

      Returns a `CameraManager` which can be used to access the USB webcams attached to the robot controller.
      See Also:
        `CameraManager`

    - #### createVuforiaLocalizer

          @Deprecated
          public static VuforiaLocalizer createVuforiaLocalizer(VuforiaLocalizer.Parameters parameters)

      Deprecated. Use `createVuforia(VuforiaLocalizer.Parameters)` instead