1 19 20 package org.netbeans.modules.java.bridge; 21 22 import org.openide.src.*; 23 import org.openide.nodes.*; 24 import java.beans.*; 25 import java.util.*; 26 27 32 public class ImportElement extends Element { 33 SourceElement source; 34 35 public ImportElement(ImportElement.Impl impl, SourceElement source) { 36 super(impl); 37 this.source = source; 38 } 39 40 public SourceElement getSource() { 41 return source; 42 } 43 44 public Import getImport() { 45 return ((ImportElement.Impl)impl).getImport(); 46 } 47 48 public void setImport(Import im) throws SourceException { 49 ((ImportElement.Impl)impl).setImport(im); 50 } 51 52 56 public void print(ElementPrinter printer) throws ElementPrinterInterruptException { 57 Impl i = (Impl)super.impl; 58 printer.print(i.getImport().toString()); 59 printer.print(";"); } 61 62 public interface Impl extends Element.Impl { 63 public Import getImport(); 64 public void setImport(Import imp) throws SourceException; 65 } 66 67 public static class MemoryImpl implements Impl { 68 69 private Import imp; 70 71 public Import getImport () { 72 return imp; 73 } 74 75 public void setImport(Import imp) throws SourceException { 76 this.imp = imp; 77 } 78 79 public Object readResolve() { 80 return null; 81 } 82 83 public void markCurrent(boolean beforeAfter) { 84 } 85 86 public void removePropertyChangeListener(PropertyChangeListener l) { 87 } 88 89 public void attachedToElement(Element el) { 90 } 91 92 public void addPropertyChangeListener(PropertyChangeListener l) { 93 } 94 95 public Node.Cookie getCookie(Class type) { 96 return null; 97 } 98 99 } 100 101 } 102 | Popular Tags |