Examples of AnnotationContext


Examples of com.bacoder.parser.java.JavaParser.AnnotationContext

            new Function<ClassOrInterfaceModifierContext, Annotation>() {
              @Override
              public Annotation apply(ClassOrInterfaceModifierContext context) {
                if (context.getChildCount() > 0
                    && context.getChild(0) instanceof AnnotationContext) {
                  AnnotationContext annotationContext = (AnnotationContext) context.getChild(0);
                  return getAdapter(AnnotationAdapter.class).adapt(annotationContext);
                } else {
                  return null;
                }
              }
View Full Code Here

Examples of com.bacoder.parser.java.JavaParser.AnnotationContext

    ExpressionContext expressionContext = getChild(context, ExpressionContext.class);
    if (expressionContext != null) {
      return getAdapter(ExpressionAdapter.class).adapt(expressionContext);
    }

    AnnotationContext annotationContext = getChild(context, AnnotationContext.class);
    if (annotationContext != null) {
      return getAdapter(AnnotationAdapter.class).adapt(annotationContext);
    }

    ElementValueArrayInitializerContext elementValueArrayInitializerContext =
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

          int size = allTypeAnnotationContexts.size();
          if (size != 0) {
            AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
            allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
            for (int i = 0, max = allTypeAnnotationContextsArray.length; i < max; i++) {
              AnnotationContext annotationContext = allTypeAnnotationContextsArray[i];
              if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
                invisibleTypeAnnotationsCounter++;
                allTypeAnnotationContexts.add(annotationContext);
              } else {
                visibleTypeAnnotationsCounter++;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

    int size = allTypeAnnotationContexts.size();
    if (size != 0) {
      AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
      allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
      for (int j = 0, max2 = allTypeAnnotationContextsArray.length; j < max2; j++) {
        AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
        if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
          invisibleTypeAnnotationsCounter++;
        } else {
          visibleTypeAnnotationsCounter++;
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

      int size = allTypeAnnotationContexts.size();
      if (size != 0) {
        AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
        allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
        for (int j = 0, max2 = allTypeAnnotationContextsArray.length; j < max2; j++) {
          AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
          if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
            invisibleTypeAnnotationsCounter++;
          } else {
            visibleTypeAnnotationsCounter++;
          }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

      this.contentsOffset += 2; // leave space for the annotations length

      int counter = 0;
      loop: for (int i = 0; i < length; i++) {
        if (invisibleTypeAnnotationsCounter == 0) break loop;
        AnnotationContext annotationContext = annotationContexts[i];
        if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
          int currentAnnotationOffset = this.contentsOffset;
          generateTypeAnnotation(annotationContext, currentAnnotationOffset);
          invisibleTypeAnnotationsCounter--;
          if (this.contentsOffset != currentAnnotationOffset) {
            counter++;
          }
        }
      }
      if (counter != 0) {
        this.contents[annotationsLengthOffset++] = (byte) (counter >> 8);
        this.contents[annotationsLengthOffset++] = (byte) counter;

        int attributeLength = this.contentsOffset - attributeLengthOffset - 4;
        this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 24);
        this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 16);
        this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 8);
        this.contents[attributeLengthOffset++] = (byte) attributeLength;
        attributesNumber++;
      } else {
        this.contentsOffset = annotationAttributeOffset;
        // reset the constant pool to its state before the clinit
        this.constantPool.resetForAttributeName(AttributeNamesConstants.RuntimeInvisibleTypeAnnotationsName, constantPoolIndex, constantPOffset);
      }
    }

    annotationAttributeOffset = this.contentsOffset;
    constantPOffset = this.constantPool.currentOffset;
    constantPoolIndex = this.constantPool.currentIndex;
    if (visibleTypeAnnotationsCounter != 0) {
      if (this.contentsOffset + 10 >= this.contents.length) {
        resizeContents(10);
      }
      int runtimeVisibleAnnotationsAttributeNameIndex =
        this.constantPool.literalIndex(AttributeNamesConstants.RuntimeVisibleTypeAnnotationsName);
      this.contents[this.contentsOffset++] = (byte) (runtimeVisibleAnnotationsAttributeNameIndex >> 8);
      this.contents[this.contentsOffset++] = (byte) runtimeVisibleAnnotationsAttributeNameIndex;
      int attributeLengthOffset = this.contentsOffset;
      this.contentsOffset += 4; // leave space for the attribute length

      int annotationsLengthOffset = this.contentsOffset;
      this.contentsOffset += 2; // leave space for the annotations length

      int counter = 0;
      loop: for (int i = 0; i < length; i++) {
        if (visibleTypeAnnotationsCounter == 0) break loop;
        AnnotationContext annotationContext = annotationContexts[i];
        if ((annotationContext.visibility & AnnotationContext.VISIBLE) != 0) {
          visibleTypeAnnotationsCounter--;
          int currentAnnotationOffset = this.contentsOffset;
          generateTypeAnnotation(annotationContext, currentAnnotationOffset);
          if (this.contentsOffset != currentAnnotationOffset) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

    int size = allTypeAnnotationContexts.size();
    if (size != 0) {
      AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
      allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
      for (int j = 0, max = allTypeAnnotationContextsArray.length; j < max; j++) {
        AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
        if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
          invisibleTypeAnnotationsCounter++;
          allTypeAnnotationContexts.add(annotationContext);
        } else {
          visibleTypeAnnotationsCounter++;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.AnnotationContext

    // of the dimensions.
    this.dimensions = dimensions;
  }
 
  private boolean internalVisit(Annotation annotation) {
    AnnotationContext annotationContext = null;
    if (annotation.isRuntimeTypeInvisible()) {
      annotationContext = new AnnotationContext(annotation, this.typeReference, this.targetType, AnnotationContext.INVISIBLE);
    } else if (annotation.isRuntimeTypeVisible()) {
      annotationContext = new AnnotationContext(annotation, this.typeReference, this.targetType, AnnotationContext.VISIBLE);
    }
    if (annotationContext != null) {
      annotationContext.wildcard = this.currentWildcard;
      switch(this.targetType) {
        case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER :
View Full Code Here

Examples of org.glassfish.apf.context.AnnotationContext

        for(EjbDescriptor next : ejbDescs) {
            procResult = setEjbDescriptorInfo(next, ainfo);
            doTimedObjectProcessing(ejbClass, next);              
        }

        AnnotationContext annContext = null;
        if( ejbDescs.length == 1 ) {
            annContext = new EjbContext(ejbDesc, ejbClass);
        } else {

            annContext = new EjbsContext(ejbDescs, ejbClass);
View Full Code Here

Examples of org.glassfish.apf.context.AnnotationContext

        for(EjbDescriptor next : ejbDescs) {
            procResult = setEjbDescriptorInfo(next, ainfo);
            doTimedObjectProcessing(ejbClass, next);              
        }

        AnnotationContext annContext = null;
        if( ejbDescs.length == 1 ) {
            annContext = new EjbContext(ejbDesc, ejbClass);
        } else {

            annContext = new EjbsContext(ejbDescs, ejbClass);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.