src/share/classes/sun/management/snmp/jvminstr/JvmClassLoadingImpl.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: Otavio Santana <otaviojava@java.net>


 112     }
 113 
 114     /**
 115      * Checker for the "JvmClassesVerboseLevel" variable.
 116      */
 117     public void checkJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x)
 118         throws SnmpStatusException {
 119         //
 120         // Add your own checking policy.
 121         //
 122         if (JvmClassesVerboseLevelVerbose.equals(x)) return;
 123         if (JvmClassesVerboseLevelSilent.equals(x))  return;
 124         throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
 125 
 126     }
 127 
 128     /**
 129      * Getter for the "JvmClassesUnloadedCount" variable.
 130      */
 131     public Long getJvmClassesUnloadedCount() throws SnmpStatusException {
 132         return new Long(getClassLoadingMXBean().getUnloadedClassCount());
 133     }
 134 
 135     /**
 136      * Getter for the "JvmClassesTotalLoadedCount" variable.
 137      */
 138     public Long getJvmClassesTotalLoadedCount() throws SnmpStatusException {
 139         return new Long(getClassLoadingMXBean().getTotalLoadedClassCount());
 140     }
 141 
 142     /**
 143      * Getter for the "JvmClassesLoadedCount" variable.
 144      */
 145     public Long getJvmClassesLoadedCount() throws SnmpStatusException {
 146         return new Long(getClassLoadingMXBean().getLoadedClassCount());
 147     }
 148 
 149 }


 112     }
 113 
 114     /**
 115      * Checker for the "JvmClassesVerboseLevel" variable.
 116      */
 117     public void checkJvmClassesVerboseLevel(EnumJvmClassesVerboseLevel x)
 118         throws SnmpStatusException {
 119         //
 120         // Add your own checking policy.
 121         //
 122         if (JvmClassesVerboseLevelVerbose.equals(x)) return;
 123         if (JvmClassesVerboseLevelSilent.equals(x))  return;
 124         throw new SnmpStatusException(SnmpStatusException.snmpRspWrongValue);
 125 
 126     }
 127 
 128     /**
 129      * Getter for the "JvmClassesUnloadedCount" variable.
 130      */
 131     public Long getJvmClassesUnloadedCount() throws SnmpStatusException {
 132         return getClassLoadingMXBean().getUnloadedClassCount();
 133     }
 134 
 135     /**
 136      * Getter for the "JvmClassesTotalLoadedCount" variable.
 137      */
 138     public Long getJvmClassesTotalLoadedCount() throws SnmpStatusException {
 139         return getClassLoadingMXBean().getTotalLoadedClassCount();
 140     }
 141 
 142     /**
 143      * Getter for the "JvmClassesLoadedCount" variable.
 144      */
 145     public Long getJvmClassesLoadedCount() throws SnmpStatusException {
 146         return (long)getClassLoadingMXBean().getLoadedClassCount();
 147     }
 148 
 149 }