author Remi Forax
 *  author Eric Bruneton
  import { Opcodes } from "./Opcodes" ; export class Handle { /**
     * The kind of field or method designated by this Handle. Should be
     *  Opcodes ,  Opcodes ,
     *  Opcodes ,  Opcodes ,
     *  Opcodes ,  Opcodes ,
     *  Opcodes ,  Opcodes or
     *  Opcodes .
      readonly tag : number ; /**
     * The internal name of the class that owns the field or method designated
     * by this handle.
     */ readonly owner : string ; /**
     * The name of the field or method designated by this handle.
     */ readonly name : string ; /**
     * The descriptor of the field or method designated by this handle.
     */ readonly descriptor : string ; /**
     * Indicate if the owner is an interface or not.
     */ readonly isInterface : boolean ; param tag the kind of field or method designated by this Handle. Must be
     *  Opcodes ,  Opcodes ,
     *  Opcodes ,  Opcodes ,
     *  Opcodes ,
     *  Opcodes ,
     *  Opcodes ,
     *  Opcodes or
     *  Opcodes .
     *  param owner param name param desc param itf public constructor ( tag , owner , name , desc , itf = tag == Opcodes . H_INVOKEINTERFACE ) { this . tag = tag ; this . owner = owner ; this . name = name ; this . descriptor = desc ; this . isInterface = itf ; } public equals ( obj ) { if ( obj === this ) { return true ; } if ( ! ( obj != null && obj instanceof Handle ) ) { return false ; } let h = obj ; return this . tag === h . tag && this . isInterface === h . isInterface && ( this . owner === h . owner ) && ( this . name === h . name ) && ( this . descriptor === h . descriptor ) ; } public hashCode ( ) { return this . tag + ( this . isInterface ? 64 : 0 ) + ( < any > this . owner . toString ( ) ) * ( < any > this . name . toString ( ) ) * ( < any > this . descriptor . toString ( ) ) ; } /**
     * Returns the textual representation of this handle. The textual
     * representation is:
     *
     * <pre>
     * for a reference to a class:
     * owner '.' name desc ' ' '(' tag ')'
     * for a reference to an interface:
     * owner '.' name desc ' ' '(' tag ' ' itf ')'
     * </pre>
     *
     * . As this format is unambiguous, it can be parsed if necessary.
     */ public toString ( ) { return this . owner + "." + this . name + this . descriptor + " (" + this . tag + ( this . isInterface ? " itf" : "" ) + ")" ; } }