home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / management / CompilationImpl.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  889 b   |  33 lines

  1. package sun.management;
  2.  
  3. import java.lang.management.CompilationMXBean;
  4.  
  5. class CompilationImpl implements CompilationMXBean {
  6.    private final VMManagement jvm;
  7.    private final String name;
  8.  
  9.    CompilationImpl(VMManagement var1) {
  10.       this.jvm = var1;
  11.       this.name = this.jvm.getCompilerName();
  12.       if (this.name == null) {
  13.          throw new InternalError("Null compiler name");
  14.       }
  15.    }
  16.  
  17.    public String getName() {
  18.       return this.name;
  19.    }
  20.  
  21.    public boolean isCompilationTimeMonitoringSupported() {
  22.       return this.jvm.isCompilationTimeMonitoringSupported();
  23.    }
  24.  
  25.    public long getTotalCompilationTime() {
  26.       if (!this.isCompilationTimeMonitoringSupported()) {
  27.          throw new UnsupportedOperationException("Compilation time monitoring is not supported.");
  28.       } else {
  29.          return this.jvm.getTotalCompileTime();
  30.       }
  31.    }
  32. }
  33.