Examples of IBinaryAnnotation


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

      // Look for references in class annotations
      IBinaryAnnotation[] annotations = reader.getAnnotations();
      if (annotations != null) {
        for (int a=0, length=annotations.length; a<length; a++) {
          IBinaryAnnotation annotation = annotations[a];
          addBinaryAnnotation(annotation);
        }
      }
      long tagBits = reader.getTagBits() & TagBits.AllStandardAnnotationsMask;
      if (tagBits != 0) {
        addBinaryStandardAnnotations(tagBits);
      }

      // first reference all methods declarations and field declarations
      MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
      if (methods != null) {
        for (int i = 0, max = methods.length; i < max; i++) {
          MethodInfo method = methods[i];
          boolean isConstructor = method.isConstructor();
          char[] descriptor = method.getMethodDescriptor();
          char[][] parameterTypes = decodeParameterTypes(descriptor, isConstructor && isNestedType);
          char[] returnType = decodeReturnType(descriptor);
          char[][] exceptionTypes = replace('/', '.', method.getExceptionTypeNames());
          if (isConstructor) {
            addConstructorDeclaration(className, parameterTypes, exceptionTypes);
          } else {
            if (!method.isClinit()) {
              addMethodDeclaration(method.getSelector(), parameterTypes, returnType, exceptionTypes);
            }
          }
          // look for references in method annotations
          annotations = method.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
        }
      }
      FieldInfo[] fields = (FieldInfo[]) reader.getFields();
      if (fields != null) {
        for (int i = 0, max = fields.length; i < max; i++) {
          FieldInfo field = fields[i];
          char[] fieldName = field.getName();
          char[] fieldType = decodeFieldType(replace('/', '.', field.getTypeName()));
          addFieldDeclaration(fieldType, fieldName);
          // look for references in field annotations
          annotations = field.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
        }
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

      // Look for references in class annotations
      IBinaryAnnotation[] annotations = reader.getAnnotations();
      if (annotations != null) {
        for (int a=0, length=annotations.length; a<length; a++) {
          IBinaryAnnotation annotation = annotations[a];
          addBinaryAnnotation(annotation);
        }
      }
      long tagBits = reader.getTagBits() & TagBits.AllStandardAnnotationsMask;
      if (tagBits != 0) {
        addBinaryStandardAnnotations(tagBits);
      }
     
      int extraFlags = ExtraFlags.getExtraFlags(reader);

      // first reference all methods declarations and field declarations
      MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
      boolean noConstructor = true;
      if (methods != null) {
        for (int i = 0, max = methods.length; i < max; i++) {
          MethodInfo method = methods[i];
          boolean isConstructor = method.isConstructor();
          char[] descriptor = method.getMethodDescriptor();
          char[][] parameterTypes = decodeParameterTypes(descriptor, isConstructor && isNestedType);
          char[] returnType = decodeReturnType(descriptor);
          char[][] exceptionTypes = replace('/', '.', method.getExceptionTypeNames());
          if (isConstructor) {
            noConstructor = false;
            char[] signature = method.getGenericSignature();
            if (signature == null) {
              if (reader.isNestedType() && ((modifiers & ClassFileConstants.AccStatic) == 0)) {
                signature = removeFirstSyntheticParameter(descriptor);
              } else {
                signature = descriptor;
              }
            }
            addConstructorDeclaration(
                name,
                parameterTypes == null ? 0 : parameterTypes.length,
                signature, 
                parameterTypes,
                method.getArgumentNames(),
                method.getModifiers(),
                packageName,
                modifiers,
                exceptionTypes,
                extraFlags);
          } else {
            if (!method.isClinit()) {
              addMethodDeclaration(method.getSelector(), parameterTypes, returnType, exceptionTypes);
            }
          }
          // look for references in method annotations
          annotations = method.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
          tagBits = method.getTagBits() & TagBits.AllStandardAnnotationsMask;
          if (tagBits != 0) {
            addBinaryStandardAnnotations(tagBits);
          }
        }
      }
      if (noConstructor) {
        addDefaultConstructorDeclaration(className, packageName, modifiers, extraFlags);
      }
      FieldInfo[] fields = (FieldInfo[]) reader.getFields();
      if (fields != null) {
        for (int i = 0, max = fields.length; i < max; i++) {
          FieldInfo field = fields[i];
          char[] fieldName = field.getName();
          char[] fieldType = decodeFieldType(replace('/', '.', field.getTypeName()));
          addFieldDeclaration(fieldType, fieldName);
          // look for references in field annotations
          annotations = field.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
          tagBits = field.getTagBits() & TagBits.AllStandardAnnotationsMask;
          if (tagBits != 0) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

* Adds new handles to the given vector.
*/
private void generateAnnotationsInfos(JavaElement member, char[] parameterName, IBinaryAnnotation[] binaryAnnotations, long tagBits, HashMap newElements) {
  if (binaryAnnotations != null) {
    for (int i = 0, length = binaryAnnotations.length; i < length; i++) {
      IBinaryAnnotation annotationInfo = binaryAnnotations[i];
      generateAnnotationInfo(member, parameterName, newElements, annotationInfo, null);
    }
  }
  generateStandardAnnotationsInfos(member, parameterName, tagBits, newElements);
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

 
  private static IBinaryAnnotation getNonNullAnnotation(LookupEnvironment environment) {
    final char[] nonNullAnnotationName = CharOperation.concat(
            'L', CharOperation.concatWith(environment.getNonNullAnnotationName(), '/'), ';');
    // create the synthetic annotation:
    return new IBinaryAnnotation() {
      @Override
      public char[] getTypeName() {
        return nonNullAnnotationName;
      }
      @Override
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

* Adds new handles to the given vector.
*/
private void generateAnnotationsInfos(JavaElement member, char[] parameterName, IBinaryAnnotation[] binaryAnnotations, long tagBits, HashMap newElements) {
  if (binaryAnnotations != null) {
    for (int i = 0, length = binaryAnnotations.length; i < length; i++) {
      IBinaryAnnotation annotationInfo = binaryAnnotations[i];
      generateAnnotationInfo(member, parameterName, newElements, annotationInfo, null);
    }
  }
  generateStandardAnnotationsInfos(member, parameterName, tagBits, newElements);
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

* Adds new handles to the given vector.
*/
private void generateAnnotationsInfos(JavaElement member, char[] parameterName, IBinaryAnnotation[] binaryAnnotations, long tagBits, HashMap newElements) {
  if (binaryAnnotations != null) {
    for (int i = 0, length = binaryAnnotations.length; i < length; i++) {
      IBinaryAnnotation annotationInfo = binaryAnnotations[i];
      generateAnnotationInfo(member, parameterName, newElements, annotationInfo, null);
    }
  }
  generateStandardAnnotationsInfos(member, parameterName, tagBits, newElements);
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation

      // Look for references in class annotations
      IBinaryAnnotation[] annotations = reader.getAnnotations();
      if (annotations != null) {
        for (int a=0, length=annotations.length; a<length; a++) {
          IBinaryAnnotation annotation = annotations[a];
          addBinaryAnnotation(annotation);
        }
      }
      long tagBits = reader.getTagBits() & TagBits.AllStandardAnnotationsMask;
      if (tagBits != 0) {
        addBinaryStandardAnnotations(tagBits);
      }
     
      int extraFlags = ExtraFlags.getExtraFlags(reader);

      // first reference all methods declarations and field declarations
      MethodInfo[] methods = (MethodInfo[]) reader.getMethods();
      boolean noConstructor = true;
      if (methods != null) {
        for (int i = 0, max = methods.length; i < max; i++) {
          MethodInfo method = methods[i];
          boolean isConstructor = method.isConstructor();
          char[] descriptor = method.getMethodDescriptor();
          char[][] parameterTypes = decodeParameterTypes(descriptor, isConstructor && isNestedType);
          char[] returnType = decodeReturnType(descriptor);
          char[][] exceptionTypes = replace('/', '.', method.getExceptionTypeNames());
          if (isConstructor) {
            noConstructor = false;
            char[] signature = method.getGenericSignature();
            if (signature == null) {
              if (reader.isNestedType() && ((modifiers & ClassFileConstants.AccStatic) == 0)) {
                signature = removeFirstSyntheticParameter(descriptor);
              } else {
                signature = descriptor;
              }
            }
            addConstructorDeclaration(
                name,
                parameterTypes == null ? 0 : parameterTypes.length,
                signature, 
                parameterTypes,
                method.getArgumentNames(),
                method.getModifiers(),
                packageName,
                modifiers,
                exceptionTypes,
                extraFlags);
          } else {
            if (!method.isClinit()) {
              addMethodDeclaration(method.getSelector(), parameterTypes, returnType, exceptionTypes);
            }
          }
          // look for references in method annotations
          annotations = method.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
          tagBits = method.getTagBits() & TagBits.AllStandardAnnotationsMask;
          if (tagBits != 0) {
            addBinaryStandardAnnotations(tagBits);
          }
        }
      }
      if (noConstructor) {
        addDefaultConstructorDeclaration(className, packageName, modifiers, extraFlags);
      }
      FieldInfo[] fields = (FieldInfo[]) reader.getFields();
      if (fields != null) {
        for (int i = 0, max = fields.length; i < max; i++) {
          FieldInfo field = fields[i];
          char[] fieldName = field.getName();
          char[] fieldType = decodeFieldType(replace('/', '.', field.getTypeName()));
          addFieldDeclaration(fieldType, fieldName);
          // look for references in field annotations
          annotations = field.getAnnotations();
          if (annotations != null) {
            for (int a=0, length=annotations.length; a<length; a++) {
              IBinaryAnnotation annotation = annotations[a];
              addBinaryAnnotation(annotation);
            }
          }
          tagBits = field.getTagBits() & TagBits.AllStandardAnnotationsMask;
          if (tagBits != 0) {
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.