Lines 1469-1479
Link Here
|
1469 |
*/ |
1469 |
*/ |
1470 |
public void addSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding) { |
1470 |
public void addSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding) { |
1471 |
generateMethodInfoHeader(methodBinding); |
1471 |
generateMethodInfoHeader(methodBinding); |
1472 |
// We know that we won't get more than 2 attribute: the code attribute + synthetic attribute |
1472 |
int methodAttributeOffset = this.contentsOffset; |
1473 |
contents[contentsOffset++] = 0; |
1473 |
// this will add exception attribute, synthetic attribute, deprecated attribute,... |
1474 |
contents[contentsOffset++] = 2; |
1474 |
int attributeNumber = generateMethodInfoAttribute(methodBinding); |
1475 |
// Code attribute |
1475 |
// Code attribute |
1476 |
int codeAttributeOffset = contentsOffset; |
1476 |
int codeAttributeOffset = contentsOffset; |
|
|
1477 |
attributeNumber++; // add code attribute |
1477 |
generateCodeAttributeHeader(); |
1478 |
generateCodeAttributeHeader(); |
1478 |
codeStream.init(this); |
1479 |
codeStream.init(this); |
1479 |
codeStream.generateSyntheticBodyForMethodAccess(methodBinding); |
1480 |
codeStream.generateSyntheticBodyForMethodAccess(methodBinding); |
Lines 1485-1500
Link Here
|
1485 |
.referenceCompilationUnit() |
1486 |
.referenceCompilationUnit() |
1486 |
.compilationResult |
1487 |
.compilationResult |
1487 |
.lineSeparatorPositions); |
1488 |
.lineSeparatorPositions); |
1488 |
// add the synthetic attribute |
1489 |
// update the number of attributes |
1489 |
int syntheticAttributeNameIndex = |
1490 |
contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); |
1490 |
constantPool.literalIndex(AttributeNamesConstants.SyntheticName); |
1491 |
contents[methodAttributeOffset] = (byte) attributeNumber; |
1491 |
contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8); |
|
|
1492 |
contents[contentsOffset++] = (byte) syntheticAttributeNameIndex; |
1493 |
// the length of a synthetic attribute is equals to 0 |
1494 |
contents[contentsOffset++] = 0; |
1495 |
contents[contentsOffset++] = 0; |
1496 |
contents[contentsOffset++] = 0; |
1497 |
contents[contentsOffset++] = 0; |
1498 |
} |
1492 |
} |
1499 |
|
1493 |
|
1500 |
/** |
1494 |
/** |