All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mockit.external.asm.Interfaces Maven / Gradle / Ivy

Go to download

JMockit is a Java toolkit for automated developer testing. It contains APIs for the creation of the objects to be tested, for mocking dependencies, and for faking external APIs; JUnit (4 & 5) and TestNG test runners are supported. It also contains an advanced code coverage tool.

There is a newer version: 1.49
Show newest version
package mockit.external.asm;

import javax.annotation.*;

final class Interfaces
{
   /**
    * Number of interfaces implemented or extended by this class or interface.
    */
   @Nonnegative private final int interfaceCount;

   /**
    * The interfaces implemented or extended by this class or interface. More precisely, this array contains the indexes
    * of the constant pool items that contain the internal names of these interfaces.
    */
   private final int[] interfaces;

   Interfaces(@Nonnull ConstantPoolGeneration cp, @Nonnull String[] interfaces) {
      int n = interfaceCount = interfaces.length;
      this.interfaces = new int[n];

      for (int i = 0; i < n; i++) {
         this.interfaces[i] = cp.newClass(interfaces[i]);
      }
   }

   @Nonnegative
   int getCount() { return interfaceCount; }

   void put(@Nonnull ByteVector out) {
      for (int i = 0; i < interfaceCount; i++) {
         out.putShort(interfaces[i]);
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy