1 11 package org.eclipse.jdt.internal.compiler.lookup; 12 13 import org.eclipse.jdt.core.compiler.CharOperation; 14 import org.eclipse.jdt.internal.compiler.ast.ImportReference; 15 16 public class ImportBinding extends Binding { 17 public char[][] compoundName; 18 public boolean onDemand; 19 public ImportReference reference; 20 21 public Binding resolvedImport; 23 public ImportBinding(char[][] compoundName, boolean isOnDemand, Binding binding, ImportReference reference) { 24 this.compoundName = compoundName; 25 this.onDemand = isOnDemand; 26 this.resolvedImport = binding; 27 this.reference = reference; 28 } 29 32 33 public final int kind() { 34 return IMPORT; 35 } 36 public boolean isStatic() { 37 return this.reference != null && this.reference.isStatic(); 38 } 39 public char[] readableName() { 40 if (onDemand) 41 return CharOperation.concat(CharOperation.concatWith(compoundName, '.'), ".*".toCharArray()); else 43 return CharOperation.concatWith(compoundName, '.'); 44 } 45 public String toString() { 46 return "import : " + new String (readableName()); } 48 } 49 | Popular Tags |