org.eclipse.jdt.internal.compiler.parser.Parser.getAnnotationType()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(17.1k)|赞(0)|评价(0)|浏览(172)

本文整理了Java中org.eclipse.jdt.internal.compiler.parser.Parser.getAnnotationType()方法的一些代码示例,展示了Parser.getAnnotationType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.getAnnotationType()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.parser.Parser
类名称:Parser
方法名:getAnnotationType

Parser.getAnnotationType介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation() {
  2. // MarkerAnnotation ::= '@' Name
  3. MarkerAnnotation markerAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  8. pushOnExpressionStack(markerAnnotation);
  9. if(!this.statementRecoveryActivated &&
  10. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  11. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  12. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  13. }
  14. this.recordStringLiterals = true;
  15. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  16. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  17. }
  18. }
  19. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. protected void consumeMarkerAnnotation() {
  2. // MarkerAnnotation ::= '@' Name
  3. MarkerAnnotation markerAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  8. pushOnExpressionStack(markerAnnotation);
  9. if(!this.statementRecoveryActivated &&
  10. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  11. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  12. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  13. }
  14. this.recordStringLiterals = true;
  15. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  16. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  17. }
  18. }
  19. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation() {
  2. // MarkerAnnotation ::= '@' Name
  3. MarkerAnnotation markerAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  8. pushOnExpressionStack(markerAnnotation);
  9. if(!this.statementRecoveryActivated &&
  10. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  11. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  12. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  13. }
  14. this.recordStringLiterals = true;
  15. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  16. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  17. }
  18. }
  19. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

  1. TypeReference typeReference = getAnnotationType();
  2. normalAnnotation = new NormalAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. int length;

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

  1. protected void consumeSingleMemberAnnotation() {
  2. // SingleMemberAnnotation ::= '@' Name '(' MemberValue ')'
  3. SingleMemberAnnotation singleMemberAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
  8. this.expressionLengthPtr--;
  9. singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
  10. pushOnExpressionStack(singleMemberAnnotation);
  11. if(this.currentElement != null) {
  12. annotationRecoveryCheckPoint(singleMemberAnnotation.sourceStart, singleMemberAnnotation.declarationSourceEnd);
  13. if (this.currentElement instanceof RecoveredAnnotation) {
  14. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(singleMemberAnnotation, oldIndex);
  15. }
  16. }
  17. if(!this.statementRecoveryActivated &&
  18. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  19. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  20. problemReporter().invalidUsageOfAnnotation(singleMemberAnnotation);
  21. }
  22. this.recordStringLiterals = true;
  23. }
  24. protected void consumeSingleMemberAnnotationMemberValue() {

代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

  1. protected void consumeSingleMemberAnnotation() {
  2. // SingleMemberAnnotation ::= '@' Name '(' MemberValue ')'
  3. SingleMemberAnnotation singleMemberAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
  8. this.expressionLengthPtr--;
  9. singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
  10. pushOnExpressionStack(singleMemberAnnotation);
  11. if(this.currentElement != null) {
  12. annotationRecoveryCheckPoint(singleMemberAnnotation.sourceStart, singleMemberAnnotation.declarationSourceEnd);
  13. if (this.currentElement instanceof RecoveredAnnotation) {
  14. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(singleMemberAnnotation, oldIndex);
  15. }
  16. }
  17. if(!this.statementRecoveryActivated &&
  18. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  19. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  20. problemReporter().invalidUsageOfAnnotation(singleMemberAnnotation);
  21. }
  22. this.recordStringLiterals = true;
  23. }
  24. protected void consumeSingleMemberAnnotationMemberValue() {

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. protected void consumeSingleMemberAnnotation() {
  2. // SingleMemberAnnotation ::= '@' Name '(' MemberValue ')'
  3. SingleMemberAnnotation singleMemberAnnotation = null;
  4. int oldIndex = this.identifierPtr;
  5. TypeReference typeReference = getAnnotationType();
  6. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  7. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
  8. this.expressionLengthPtr--;
  9. singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
  10. pushOnExpressionStack(singleMemberAnnotation);
  11. if(this.currentElement != null) {
  12. annotationRecoveryCheckPoint(singleMemberAnnotation.sourceStart, singleMemberAnnotation.declarationSourceEnd);
  13. if (this.currentElement instanceof RecoveredAnnotation) {
  14. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(singleMemberAnnotation, oldIndex);
  15. }
  16. }
  17. if(!this.statementRecoveryActivated &&
  18. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  19. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  20. problemReporter().invalidUsageOfAnnotation(singleMemberAnnotation);
  21. }
  22. this.recordStringLiterals = true;
  23. }
  24. protected void consumeSingleMemberAnnotationMemberValue() {

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

  1. protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
  2. // MarkerAnnotation ::= AnnotationName
  3. // MarkerTypeAnnotation ::= TypeAnnotationName
  4. MarkerAnnotation markerAnnotation = null;
  5. int oldIndex = this.identifierPtr;
  6. TypeReference typeReference = getAnnotationType();
  7. markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
  8. markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
  9. if (isTypeAnnotation) {
  10. pushOnTypeAnnotationStack(markerAnnotation);
  11. } else {
  12. pushOnExpressionStack(markerAnnotation);
  13. }
  14. if(!this.statementRecoveryActivated &&
  15. this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
  16. this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
  17. problemReporter().invalidUsageOfAnnotation(markerAnnotation);
  18. }
  19. this.recordStringLiterals = true;
  20. if (this.currentElement != null && this.currentElement instanceof RecoveredAnnotation) {
  21. this.currentElement = ((RecoveredAnnotation)this.currentElement).addAnnotation(markerAnnotation, oldIndex);
  22. }
  23. }
  24. protected void consumeMemberValueArrayInitializer() {

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

  1. TypeReference typeReference = getAnnotationType();
  2. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. TypeReference typeReference = getAnnotationType();
  2. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

  1. TypeReference typeReference = getAnnotationType();
  2. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

  1. TypeReference typeReference = getAnnotationType();
  2. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. TypeReference typeReference = getAnnotationType();
  2. singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.intStack[this.intPtr--]);
  3. singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];

相关文章

Parser类方法