< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/signature/SignatureWriter.java

Print this page




  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm.signature;
  60 
  61 import jdk.internal.org.objectweb.asm.Opcodes;
  62 
  63 /**
  64  * A signature visitor that generates signatures in string format.
  65  *
  66  * @author Thomas Hallgren
  67  * @author Eric Bruneton
  68  */
  69 public class SignatureWriter extends SignatureVisitor {
  70 
  71     /**
  72      * Buffer used to construct the signature.
  73      */
  74     private final StringBuffer buf = new StringBuffer();
  75 
  76     /**
  77      * Indicates if the signature contains formal type parameters.
  78      */
  79     private boolean hasFormals;
  80 
  81     /**
  82      * Indicates if the signature contains method parameter types.
  83      */
  84     private boolean hasParameters;
  85 
  86     /**
  87      * Stack used to keep track of class types that have arguments. Each element
  88      * of this stack is a boolean encoded in one bit. The top of the stack is
  89      * the lowest order bit. Pushing false = *2, pushing true = *2+1, popping =
  90      * /2.
  91      */
  92     private int argumentStack;
  93 
  94     /**




  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm.signature;
  60 
  61 import jdk.internal.org.objectweb.asm.Opcodes;
  62 
  63 /**
  64  * A signature visitor that generates signatures in string format.
  65  *
  66  * @author Thomas Hallgren
  67  * @author Eric Bruneton
  68  */
  69 public class SignatureWriter extends SignatureVisitor {
  70 
  71     /**
  72      * Builder used to construct the signature.
  73      */
  74     private final StringBuilder buf = new StringBuilder();
  75 
  76     /**
  77      * Indicates if the signature contains formal type parameters.
  78      */
  79     private boolean hasFormals;
  80 
  81     /**
  82      * Indicates if the signature contains method parameter types.
  83      */
  84     private boolean hasParameters;
  85 
  86     /**
  87      * Stack used to keep track of class types that have arguments. Each element
  88      * of this stack is a boolean encoded in one bit. The top of the stack is
  89      * the lowest order bit. Pushing false = *2, pushing true = *2+1, popping =
  90      * /2.
  91      */
  92     private int argumentStack;
  93 
  94     /**


< prev index next >