|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.java.bridge; import org.openide.src.*; import org.openide.nodes.*; import java.beans.*; import java.util.*; /** * * @author sdedic * @version */ public class ImportElement extends Element { SourceElement source; public ImportElement(ImportElement.Impl impl, SourceElement source) { super(impl); this.source = source; } public SourceElement getSource() { return source; } public Import getImport() { return ((ImportElement.Impl)impl).getImport(); } public void setImport(Import im) throws SourceException { ((ImportElement.Impl)impl).setImport(im); } /** Print this element (and all its subelements) into an element printer. * @param printer the element printer * @exception ElementPrinterInterruptException if the printer canceled the printing */ public void print(ElementPrinter printer) throws ElementPrinterInterruptException { Impl i = (Impl)super.impl; printer.print(i.getImport().toString()); printer.print(";"); // NOI18N } public interface Impl extends Element.Impl { public Import getImport(); public void setImport(Import imp) throws SourceException; } public static class MemoryImpl implements Impl { private Import imp; public Import getImport () { return imp; } public void setImport(Import imp) throws SourceException { this.imp = imp; } public Object readResolve() { return null; } public void markCurrent(boolean beforeAfter) { } public void removePropertyChangeListener(PropertyChangeListener l) { } public void attachedToElement(Element el) { } public void addPropertyChangeListener(PropertyChangeListener l) { } public Node.Cookie getCookie(Class type) { return null; } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.