< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/util/Name.java

Print this page

        

@@ -23,12 +23,10 @@
  * questions.
  */
 
 package com.sun.tools.javac.util;
 
-import com.sun.tools.javac.jvm.ClassFile;
-import com.sun.tools.javac.jvm.PoolConstant;
 import com.sun.tools.javac.util.DefinedBy.Api;
 
 /** An abstraction for internal compiler strings. They are stored in
  *  Utf8 format. Names are stored in a Name.Table, and are unique within
  *  that table.

@@ -36,11 +34,11 @@
  *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-public abstract class Name implements javax.lang.model.element.Name, PoolConstant {
+public abstract class Name implements javax.lang.model.element.Name {
 
     public final Table table;
 
     protected Name(Table table) {
         this.table = table;

@@ -52,15 +50,10 @@
     @DefinedBy(Api.LANGUAGE_MODEL)
     public boolean contentEquals(CharSequence cs) {
         return toString().equals(cs.toString());
     }
 
-    @Override
-    public int poolTag() {
-        return ClassFile.CONSTANT_Utf8;
-    }
-
     /**
      * {@inheritDoc}
      */
     public int length() {
         return toString().length();

@@ -193,18 +186,10 @@
 
     /** Get the start offset of this name within its byte array.
      */
     public abstract int getByteOffset();
 
-    public interface NameMapper<X> {
-        X map(byte[] bytes, int offset, int len);
-    }
-
-    public <X> X map(NameMapper<X> mapper) {
-        return mapper.map(getByteArray(), getByteOffset(), getByteLength());
-    }
-
     /** An abstraction for the hash table used to create unique Name instances.
      */
     public static abstract class Table {
         /** Standard name table.
          */
< prev index next >