1   package com.stateofflow.eclipse.metrics.type;
2   
3   import org.eclipse.jdt.core.dom.ITypeBinding;
4   import org.eclipse.jdt.core.dom.TypeDeclaration;
5   
6   public final class TypeDeclarationAdapter extends NonNullType {
7       public TypeDeclarationAdapter(final TypeDeclaration node) {
8           super(node);
9       }
10  
11      protected String getNamePart() {
12          return getTypedNode().getName().getIdentifier();
13      }
14  
15      public int getStartPosition() {
16          return getTypedNode().getName().getStartPosition();
17      }
18  
19      private TypeDeclaration getTypedNode() {
20          return (TypeDeclaration) getNode();
21      }
22  
23      public ITypeBinding resolveBinding() {
24          return getTypedNode().resolveBinding();
25      }
26  }
27