1 16 package com.google.gwt.dev.jdt; 17 18 import com.google.gwt.core.ext.typeinfo.CompilationUnitProvider; 19 20 23 public class StaticCompilationUnitProvider implements CompilationUnitProvider { 24 25 private final String packageName; 26 27 private final String simpleTypeName; 28 29 private final char[] source; 30 31 35 public StaticCompilationUnitProvider(String packageName, 36 String simpleTypeName, char[] source) { 37 this.packageName = packageName; 38 this.simpleTypeName = simpleTypeName; 39 this.source = source; 40 } 41 42 45 public long getLastModified() { 46 return 0; 47 } 48 49 52 public final String getLocation() { 53 return "transient source for " + packageName + "." + simpleTypeName; 54 } 55 56 public String getPackageName() { 57 return packageName; 58 } 59 60 public char[] getSource() { 61 return source; 62 } 63 64 public String getTypeName() { 65 return simpleTypeName; 66 } 67 68 public boolean isTransient() { 69 return true; 70 } 71 72 public String toString() { 73 return getLocation(); 74 } 75 } 76 | Popular Tags |