freenet.support.CPUInformation

## Class CPUID

- java.lang.Object
- - freenet.support.CPUInformation.CPUID

-     public class CPUID
      extends Object

  A class for retrieveing details about the CPU using the CPUID assembly instruction. Ref: http://en.wikipedia.org/wiki/Cpuid

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `CPUID.CPUIDResult` A class that can (amongst other things I assume) represent the state of the different CPU registers after a call to the CPUID assembly method

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CPUID()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static int` | `getCPUExtendedFamily()` Only valid if family == 15.
    `(package private) static int` | `getCPUExtendedModel()` Only valid if family == 15, or, for Intel only, family == 6.
    `(package private) static int` | `getCPUFamily()`
    `(package private) static int` | `getCPUModel()`
    `(package private) static String` | `getCPUModelName()` The model name string, up to 48 characters, as reported by the processor itself.
    `(package private) static int` | `getCPUStepping()`
    `(package private) static int` | `getCPUType()`
    `(package private) static String` | `getCPUVendorID()`
    `(package private) static int` | `getECXCPUFlags()`
    `(package private) static int` | `getEDXCPUFlags()`
    `(package private) static int` | `getExtendedEBXFeatureFlags()`
    `(package private) static int` | `getExtendedECXCPUFlags()`
    `(package private) static int` | `getExtendedECXFeatureFlags()` There's almost nothing in here.
    `(package private) static int` | `getExtendedEDXCPUFlags()`
    `static CPUInfo` | `getInfo()` Returns a CPUInfo item for the current type of CPU If I could I would declare this method in a interface named CPUInfoProvider and implement that interface in this class.
    `static int` | `getJcpuidVersion()` Return the jcpuid version
    `static void` | `main(String[] args)`

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

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

- - ### Constructor Detail

    - #### CPUID

          public CPUID()

  - ### Method Detail

    - #### getCPUExtendedFamily

          static int getCPUExtendedFamily()

      Only valid if family == 15. Add family to get full family.
      Returns:
        0-255

    - #### getCPUExtendedModel

          static int getCPUExtendedModel()

      Only valid if family == 15, or, for Intel only, family == 6. Left shift by 4 and then add model to get full model.
      Returns:
        0-15

    - #### getCPUFamily

          static int getCPUFamily()

      Returns:
        0-15

    - #### getCPUModel

          static int getCPUModel()

      Returns:
        0-15

    - #### getCPUModelName

          static String getCPUModelName()

      The model name string, up to 48 characters, as reported by the processor itself.
      Returns:
        trimmed string, null if unsupported

    - #### getCPUStepping

          static int getCPUStepping()

      Returns:
        0-15

    - #### getCPUType

          static int getCPUType()

      Returns:
        0-15

    - #### getCPUVendorID

          static String getCPUVendorID()

    - #### getECXCPUFlags

          static int getECXCPUFlags()

    - #### getEDXCPUFlags

          static int getEDXCPUFlags()

    - #### getExtendedEBXFeatureFlags

          static int getExtendedEBXFeatureFlags()

    - #### getExtendedECXCPUFlags

          static int getExtendedECXCPUFlags()

    - #### getExtendedECXFeatureFlags

          static int getExtendedECXFeatureFlags()

      There's almost nothing in here.

    - #### getExtendedEDXCPUFlags

          static int getExtendedEDXCPUFlags()

    - #### getInfo

          public static CPUInfo getInfo()
                                 throws UnknownCPUException

      Returns a CPUInfo item for the current type of CPU If I could I would declare this method in a interface named CPUInfoProvider and implement that interface in this class. This would make it easier for other people to understand that there is nothing preventing them from coding up new providers, probably using other detection methods than the x86-only CPUID instruction
      Throws:
        `UnknownCPUException`

    - #### getJcpuidVersion

          public static int getJcpuidVersion()

      Return the jcpuid version
      Returns:
        0 if no jcpuid available, 2 if version not supported

    - #### main

          public static void main(String[] args)