1 19 20 package org.netbeans.modules.java.ui.nodes; 21 22 import org.openide.src.*; 23 import org.openide.nodes.Node; 24 import org.netbeans.jmi.javamodel.*; 25 26 29 final class BridgeSource2Element implements ExElementNodeFactory { 30 31 private final SourceNodeFactory delegate; 32 33 public BridgeSource2Element(SourceNodeFactory delegate) { 34 this.delegate = delegate; 35 } 36 37 public Node createConstructorNode(ConstructorElement element) { 38 Constructor constr = (Constructor) BridgeUtils.getJavaObject(element); 39 return delegate.createConstructorNode(constr); 40 } 41 42 public Node createMethodNode(MethodElement element) { 43 Method method = (Method) BridgeUtils.getJavaObject(element); 44 return delegate.createMethodNode(method); 45 } 46 47 public Node createFieldNode(FieldElement element) { 48 Field field = (Field) BridgeUtils.getJavaObject(element); 49 return delegate.createFieldNode(field); 50 } 51 52 public Node createInitializerNode(InitializerElement element) { 53 Initializer init = (Initializer) BridgeUtils.getJavaObject(element); 54 return delegate.createInitializerNode(init); 55 } 56 57 public Node createClassNode(ClassElement element) { 58 JavaClass jo = null; 59 if (element != null) { 60 jo = (JavaClass) BridgeUtils.getJavaObject(element); 61 } 62 return delegate.createClassNode(jo); 63 } 64 65 public Node createWaitNode() { 66 return delegate.createWaitNode(); 67 } 68 69 public Node createErrorNode() { 70 return delegate.createErrorNode(); 71 } 72 73 public Node createEnumNode(JavaEnum element) { 74 return delegate.createEnumNode(element); 75 } 76 77 public Node createEnumConstantNode(EnumConstant element) { 78 return delegate.createEnumConstantNode(element); 79 } 80 81 public Node createAnnotationTypeNode(AnnotationType element) { 82 return delegate.createAnnotationTypeNode(element); 83 } 84 85 public Node createAnnotationTypeMethodNode(Attribute element) { 86 return delegate.createAnnotationTypeMethodNode(element); 87 } 88 } 89 | Popular Tags |