Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 546-556
Link Here
|
546 |
IRuntimeInvisibleParameterAnnotationsAttribute attribute = (IRuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute; |
546 |
IRuntimeInvisibleParameterAnnotationsAttribute attribute = (IRuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute; |
547 |
invisibleParameterAnnotations = attribute.getParameterAnnotations(); |
547 |
invisibleParameterAnnotations = attribute.getParameterAnnotations(); |
548 |
length = invisibleParameterAnnotations.length; |
548 |
length = invisibleParameterAnnotations.length; |
|
|
549 |
if (length > 0) { |
550 |
int parameterNamesLength = parameterNames.length; |
551 |
if (length < parameterNamesLength) { |
552 |
System.arraycopy(invisibleParameterAnnotations, 0, (invisibleParameterAnnotations = new IParameterAnnotation[parameterNamesLength]), 1, length); |
553 |
length = parameterNamesLength; |
554 |
} |
555 |
} |
549 |
} |
556 |
} |
550 |
if (runtimeVisibleParameterAnnotationsAttribute != null) { |
557 |
if (runtimeVisibleParameterAnnotationsAttribute != null) { |
551 |
IRuntimeVisibleParameterAnnotationsAttribute attribute = (IRuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute; |
558 |
IRuntimeVisibleParameterAnnotationsAttribute attribute = (IRuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute; |
552 |
visibleParameterAnnotations = attribute.getParameterAnnotations(); |
559 |
visibleParameterAnnotations = attribute.getParameterAnnotations(); |
553 |
length = visibleParameterAnnotations.length; |
560 |
length = visibleParameterAnnotations.length; |
|
|
561 |
if (length > 0) { |
562 |
int parameterNamesLength = parameterNames.length; |
563 |
if (length < parameterNamesLength) { |
564 |
System.arraycopy(visibleParameterAnnotations, 0, (visibleParameterAnnotations = new IParameterAnnotation[parameterNamesLength]), 1, length); |
565 |
length = parameterNamesLength; |
566 |
} |
567 |
} |
554 |
} |
568 |
} |
555 |
int insertionPosition = CharOperation.indexOf('(', methodHeader) + 1; |
569 |
int insertionPosition = CharOperation.indexOf('(', methodHeader) + 1; |
556 |
int start = 0; |
570 |
int start = 0; |
Lines 561-575
Link Here
|
561 |
stringBuffer.append(' '); |
575 |
stringBuffer.append(' '); |
562 |
} |
576 |
} |
563 |
int stringBufferSize = stringBuffer.length(); |
577 |
int stringBufferSize = stringBuffer.length(); |
564 |
if (runtimeVisibleParameterAnnotationsAttribute != null) { |
578 |
if (visibleParameterAnnotations != null) { |
565 |
disassembleAsModifier((IRuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode); |
579 |
disassembleAsModifier(visibleParameterAnnotations, stringBuffer, i, lineSeparator, tabNumber, mode); |
566 |
} |
580 |
} |
567 |
if (runtimeInvisibleParameterAnnotationsAttribute != null) { |
581 |
if (invisibleParameterAnnotations != null) { |
568 |
if (stringBuffer.length() != stringBufferSize) { |
582 |
if (stringBuffer.length() != stringBufferSize) { |
569 |
stringBuffer.append(' '); |
583 |
stringBuffer.append(' '); |
570 |
stringBufferSize = stringBuffer.length(); |
584 |
stringBufferSize = stringBuffer.length(); |
571 |
} |
585 |
} |
572 |
disassembleAsModifier((IRuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode); |
586 |
disassembleAsModifier(invisibleParameterAnnotations, stringBuffer, i, lineSeparator, tabNumber, mode); |
573 |
} |
587 |
} |
574 |
if (i == 0 && stringBuffer.length() != stringBufferSize) { |
588 |
if (i == 0 && stringBuffer.length() != stringBufferSize) { |
575 |
stringBuffer.append(' '); |
589 |
stringBuffer.append(' '); |
Lines 1862-1882
Link Here
|
1862 |
} |
1876 |
} |
1863 |
} |
1877 |
} |
1864 |
|
1878 |
|
1865 |
private void disassembleAsModifier(IRuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) { |
1879 |
private void disassembleAsModifier(IParameterAnnotation[] parameterAnnotations, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) { |
1866 |
IParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations(); |
|
|
1867 |
if (parameterAnnotations.length > index) { |
1868 |
disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode); |
1869 |
} |
1870 |
} |
1871 |
|
1872 |
private void disassembleAsModifier(IRuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) { |
1873 |
IParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations(); |
1874 |
if (parameterAnnotations.length > index) { |
1880 |
if (parameterAnnotations.length > index) { |
1875 |
disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode); |
1881 |
disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode); |
1876 |
} |
1882 |
} |
1877 |
} |
1883 |
} |
1878 |
|
1884 |
|
1879 |
private void disassembleAsModifier(IParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) { |
1885 |
private void disassembleAsModifier(IParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) { |
|
|
1886 |
if (parameterAnnotation == null) return; |
1880 |
IAnnotation[] annotations = parameterAnnotation.getAnnotations(); |
1887 |
IAnnotation[] annotations = parameterAnnotation.getAnnotations(); |
1881 |
for (int i = 0, max = annotations.length; i < max; i++) { |
1888 |
for (int i = 0, max = annotations.length; i < max; i++) { |
1882 |
if (i > 0) { |
1889 |
if (i > 0) { |