< prev index next >

src/jdk.internal.clang/share/classes/jdk/internal/clang/Type.java

Print this page




  51 
  52     // Struct/RecordType
  53     public native long getOffsetOf(String fieldName);
  54 
  55     // Typedef
  56     public native Type canonicalType();
  57 
  58     public native String spelling();
  59 
  60     public native int kind1();
  61 
  62     public native long size();
  63 
  64     public TypeKind kind() {
  65         int v = kind1();
  66         // FIXME: assert(v == getData().getInt(0));
  67         return TypeKind.valueOf(v);
  68     }
  69 
  70     public native Cursor getDeclarationCursor();


















  71 }


  51 
  52     // Struct/RecordType
  53     public native long getOffsetOf(String fieldName);
  54 
  55     // Typedef
  56     public native Type canonicalType();
  57 
  58     public native String spelling();
  59 
  60     public native int kind1();
  61 
  62     public native long size();
  63 
  64     public TypeKind kind() {
  65         int v = kind1();
  66         // FIXME: assert(v == getData().getInt(0));
  67         return TypeKind.valueOf(v);
  68     }
  69 
  70     public native Cursor getDeclarationCursor();
  71 
  72     public native boolean equalType(Type other);
  73 
  74     @Override
  75     public boolean equals(Object other) {
  76         if (this == other) {
  77             return true;
  78         }
  79         if (!(other instanceof Type)) {
  80             return false;
  81         }
  82         return equalType((Type)other);
  83     }
  84 
  85     @Override
  86     public int hashCode() {
  87         return spelling().hashCode();
  88     }
  89 }
< prev index next >