Examples of AnnotationBinding


Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

  private void reportBinding(Object key, ASTRequestor astRequestor, WorkingCopyOwner owner, CompilationUnitDeclaration unit) {
    BindingKeyResolver keyResolver = (BindingKeyResolver) key;
    Binding compilerBinding = keyResolver.getCompilerBinding();
    if (compilerBinding != null) {
      DefaultBindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, false, this.fromJavaProject);
      AnnotationBinding annotationBinding = keyResolver.getAnnotationBinding();
      IBinding binding;
      if (annotationBinding != null) {
        binding = resolver.getAnnotationInstance(annotationBinding);
      } else {
        binding = resolver.getBinding(compilerBinding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

  private void reportBinding(Object key, FileASTRequestor astRequestor, CompilationUnitDeclaration unit) {
    BindingKeyResolver keyResolver = (BindingKeyResolver) key;
    Binding compilerBinding = keyResolver.getCompilerBinding();
    if (compilerBinding != null) {
      DefaultBindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, false, this.fromJavaProject);
      AnnotationBinding annotationBinding = keyResolver.getAnnotationBinding();
      IBinding binding;
      if (annotationBinding != null) {
        binding = resolver.getAnnotationInstance(annotationBinding);
      } else {
        binding = resolver.getBinding(compilerBinding);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

      method.setInliningAllowed(false);
    }
  }

  private void maybeAddMethodSpecialization(AbstractMethodDeclaration x, JMethod method) {
    AnnotationBinding specializeAnnotation =
        JdtUtil.getAnnotation(x.binding, SpecializeMethod.class.getName());
    if (specializeAnnotation == null) {
      return;
    }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

  }

  static AnnotationBinding getAnnotation(Annotation[] annotations, String nameToFind) {
    if (annotations != null) {
      for (Annotation a : annotations) {
        AnnotationBinding annBinding = a.getCompilerAnnotation();
        if (annBinding != null) {
          String annName = CharOperation.toString(annBinding.getAnnotationType().compoundName);
          if (nameToFind.equals(annName)) {
            return annBinding;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

    if (!(typeBinding instanceof ReferenceBinding) || !(typeBinding instanceof SourceTypeBinding)) {
      return false;
    }

    AnnotationBinding jsInterface = JdtUtil.getAnnotation(typeBinding, JsInteropUtil.JSTYPE_CLASS);
    return jsInterface != null;
  }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

    }

    private void checkJsType(TypeDeclaration type, TypeBinding typeBinding) {
      ReferenceBinding binding = (ReferenceBinding) typeBinding;
      if (binding.isClass()) {
        AnnotationBinding jsinterfaceAnn = JdtUtil.getAnnotation(typeBinding,
          JsInteropUtil.JSTYPE_CLASS);
        String jsPrototype = JdtUtil.getAnnotationParameterString(jsinterfaceAnn, "prototype");
        if (jsPrototype != null && !"".equals(jsPrototype)) {
          errorOn(type, ERR_JS_TYPE_WITH_PROTOTYPE_SET_NOT_ALLOWED_ON_CLASS_TYPES);
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

        checkJsExport(mb, !binding.isInterface());
      }
    }

    private void checkJsExport(MethodBinding mb, boolean allowed) {
      AnnotationBinding jsExport = JdtUtil.getAnnotation(mb, JsInteropUtil.JSEXPORT_CLASS);
      if (jsExport != null && allowed) {
        if (!mb.isConstructor() && !mb.isStatic()) {
          errorOn(mb, ERR_JSEXPORT_ONLY_CTORS_AND_STATIC_METHODS);
        }
      }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

        }
      }
    }

    private void checkJsProperty(MethodBinding mb, boolean allowed) {
      AnnotationBinding jsProperty = JdtUtil.getAnnotation(mb, JsInteropUtil.JSPROPERTY_CLASS);
      if (jsProperty != null) {
        if (!allowed) {
          errorOn(mb, ERR_JSPROPERTY_ONLY_ON_INTERFACES);
          return;
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

      for (MethodBinding mb : type.binding.methods()) {
        checkJsExport(mb, true);
        checkJsProperty(mb, false);
      }

      AnnotationBinding jsinterfaceAnn = JdtUtil.getAnnotation(jsInterface,
          JsInteropUtil.JSTYPE_CLASS);
      String jsPrototype = JdtUtil.getAnnotationParameterString(jsinterfaceAnn, "prototype");
      boolean isNative = JdtUtil.getAnnotationParameterBoolean(jsinterfaceAnn, "isNative");
      if (!Strings.isNullOrEmpty(jsPrototype)) {
        checkClassExtendsMagicPrototype(type, jsInterface, !isNative, isNative);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding

  public static final String JSTYPEPROTOTYPE_CLASS =
      "com.google.gwt.core.client.js.impl.PrototypeOfJsType";

  public static String maybeGetJsNamespace(TypeDeclaration x) {
    if (x.annotations != null) {
      AnnotationBinding jsNamespace = JdtUtil.getAnnotation(x.binding, JSNAMESPACE_CLASS);
      if (jsNamespace != null) {
       return JdtUtil.getAnnotationParameterString(jsNamespace, "value");
      }
    }
    return null;
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.