1 19 20 package org.netbeans.modules.java.codegen; 21 22 import org.openide.src.*; 23 24 import org.netbeans.modules.java.bridge.Binding; 25 26 31 class Member extends ElementBinding implements Binding.Member { 32 33 public Member(MemberElement me, SourceText s) { 34 super(me, s); 35 } 36 37 protected Element cloneElement() { 38 try { 39 return (MemberElement)((MemberElement)getElement()).clone(); 40 } catch (CloneNotSupportedException ex) { 41 throw new InternalError ("Cannot clone element."); } 43 } 44 45 48 public void changeModifiers(int newMods) throws SourceException { 49 if (!source.isGeneratorEnabled()) 50 return; 51 52 MemberElement el = (MemberElement)cloneElement(); 53 el.setModifiers(newMods); 54 regenerateHeader(el); 55 } 56 57 60 public void changeName(Identifier name) throws SourceException { 61 if (!source.isGeneratorEnabled()) 62 return; 63 64 MemberElement el = (MemberElement)cloneElement(); 65 el.setName(name); 66 regenerateHeader(el); 67 } 68 69 72 public void updateFrom(Binding other) { 73 } 74 } 75 | Popular Tags |