} else { CharArrayCache charArrayCache = new CharArrayCache(); charArrayCache.putIfAbsent(entry.signature, entry.index); index = charArrayCache.putIfAbsent(key2, value); this.nameAndTypeCacheForFieldsAndMethods.put(key1, charArrayCache); index = charArrayCache.putIfAbsent(key2, value);
} else { CharArrayCache charArrayCache = new CharArrayCache(); charArrayCache.putIfAbsent(entry.signature, entry.index); index = charArrayCache.putIfAbsent(key2, value); this.nameAndTypeCacheForFieldsAndMethods.put(key1, charArrayCache); index = charArrayCache.putIfAbsent(key2, value);
public int literalIndex(byte[] utf8encoding, char[] stringCharArray) { int index; if ((index = this.UTF8Cache.putIfAbsent(stringCharArray, this.currentIndex)) < 0) {
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndex(char[] stringCharArray, byte[] utf8encoding) { int index; if ((index = this.stringCache.putIfAbsent(stringCharArray, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(StringTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(utf8encoding, stringCharArray); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } /**
public int literalIndex(char[] stringCharArray, byte[] utf8encoding) { int index; if ((index = this.stringCache.putIfAbsent(stringCharArray, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(StringTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(utf8encoding, stringCharArray); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } /**
public int literalIndex(char[] stringCharArray, byte[] utf8encoding) { int index; if ((index = this.stringCache.putIfAbsent(stringCharArray, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(StringTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(utf8encoding, stringCharArray); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } /**
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForModule(final char[] moduleName) { int index; if ((index = this.moduleCache.putIfAbsent(moduleName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ModuleTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(moduleName); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } public int literalIndexForPackage(final char[] packageName) {
public int literalIndexForPackage(final char[] packageName) { int index; if ((index = this.packageCache.putIfAbsent(packageName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(PackageTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(packageName); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } public int literalIndexForType(final char[] constantPoolName) {
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndex(char[] stringCharArray, byte[] utf8encoding) { int index; if ((index = this.stringCache.putIfAbsent(stringCharArray, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(StringTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(utf8encoding, stringCharArray); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } /**
public int literalIndexForModule(final char[] moduleName) { int index; if ((index = this.moduleCache.putIfAbsent(moduleName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ModuleTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(moduleName); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } public int literalIndexForPackage(final char[] packageName) {
public int literalIndexForPackage(final char[] packageName) { int index; if ((index = this.packageCache.putIfAbsent(packageName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } // Write the tag first int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(PackageTag); // Then the string index int stringIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int stringIndex = literalIndex(packageName); this.poolContent[stringIndexOffset++] = (byte) (stringIndex >> 8); this.poolContent[stringIndexOffset] = (byte) stringIndex; } return index; } public int literalIndexForType(final char[] constantPoolName) {
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*
public int literalIndexForType(final char[] constantPoolName) { int index; if ((index = this.classCache.putIfAbsent(constantPoolName, this.currentIndex)) < 0) { // The entry doesn't exit yet this.currentIndex++; if ((index = -index) > 0xFFFF){ this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType()); } int length = this.offsets.length; if (length <= index) { // resize System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length); } this.offsets[index] = this.currentOffset; writeU1(ClassTag); // Then the name index int nameIndexOffset = this.currentOffset; if (this.currentOffset + 2 >= this.poolContent.length) { resizePoolContents(2); } this.currentOffset+=2; final int nameIndex = literalIndex(constantPoolName); this.poolContent[nameIndexOffset++] = (byte) (nameIndex >> 8); this.poolContent[nameIndexOffset] = (byte) nameIndex; } return index; } /*