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