java.lang.Objectjava.lang.Enum<MemoryType>
java.lang.management.MemoryType
public enum MemoryType
      内存池的类型。 
| 枚举常量摘要 | |
|---|---|
| HEAP堆内存类型。 | |
| NON_HEAP非堆内存类型。 | |
| 方法摘要 | |
|---|---|
|  String | toString()返回该 MemoryType 的字符串表示形式。 | 
| static MemoryType | valueOf(String name)返回带有指定名称的该类型的枚举常量。 | 
| static MemoryType[] | values()Returns an array containing the constants of this enum type, in the order they are declared. | 
| 从类 java.lang.Enum 继承的方法 | 
|---|
| clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| getClass, notify, notifyAll, wait, wait, wait | 
| 枚举常量详细信息 | 
|---|
public static final MemoryType HEAP
Java 虚拟机具有一个堆,堆是运行时数据区域,所有类实例和数组的内存均从此处分配。
public static final MemoryType NON_HEAP
Java 虚拟机管理堆之外的内存(称为非堆内存)。非堆内存包括方法区 和 Java 虚拟机的内部处理或优化所需的内存。它存储每个类结构,如运行时常数池、字段和方法数据,以及方法和构造方法的代码。
| 方法详细信息 | 
|---|
public static final MemoryType[] values()
for(MemoryType c : MemoryType.values())
        System.out.println(c);
 
    
public static MemoryType valueOf(String name)
指定要返回的枚举常量的名称。 - 
     如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentException
     public String toString()
Enum<MemoryType> 中的 
      toString