Package com.google.dart.engine.ast

Examples of com.google.dart.engine.ast.FieldDeclaration


   */
  private void parseComponentProperties_fromFields(List<AngularPropertyElement> properties) {
    NodeList<ClassMember> members = classDeclaration.getMembers();
    for (ClassMember member : members) {
      if (member instanceof FieldDeclaration) {
        FieldDeclaration fieldDeclaration = (FieldDeclaration) member;
        for (Annotation annotation : fieldDeclaration.getMetadata()) {
          // prepare property kind (if property annotation at all)
          AngularPropertyKind kind = null;
          if (isAngularAnnotation(annotation, NG_ATTR)) {
            kind = AngularPropertyKind.ATTR;
          } else if (isAngularAnnotation(annotation, NG_CALLBACK)) {
View Full Code Here


  private void validateFieldInitializers(ClassDeclaration classDeclaration,
      ConstructorDeclaration errorSite) {
    NodeList<ClassMember> members = classDeclaration.getMembers();
    for (ClassMember member : members) {
      if (member instanceof FieldDeclaration) {
        FieldDeclaration fieldDeclaration = (FieldDeclaration) member;
        if (!fieldDeclaration.isStatic()) {
          for (VariableDeclaration variableDeclaration : fieldDeclaration.getFields().getVariables()) {
            Expression initializer = variableDeclaration.getInitializer();
            if (initializer != null) {
              EvaluationResultImpl result = initializer.accept(new ConstantVisitor(typeProvider));
              if (!(result instanceof ValidResult)) {
                errorReporter.reportErrorForNode(
View Full Code Here

      }
    }
    boolean foundError = false;
    for (ClassMember classMember : classMembers) {
      if (classMember instanceof FieldDeclaration) {
        FieldDeclaration field = (FieldDeclaration) classMember;
        foundError = foundError | checkForFinalNotInitialized(field.getFields());
      }
    }
    return foundError;
  }
View Full Code Here

    addAnnotations(annotationList, node.getMetadata());
    if (node instanceof VariableDeclaration && node.getParent() instanceof VariableDeclarationList) {
      VariableDeclarationList list = (VariableDeclarationList) node.getParent();
      addAnnotations(annotationList, list.getMetadata());
      if (list.getParent() instanceof FieldDeclaration) {
        FieldDeclaration fieldDeclaration = (FieldDeclaration) list.getParent();
        addAnnotations(annotationList, fieldDeclaration.getMetadata());
      } else if (list.getParent() instanceof TopLevelVariableDeclaration) {
        TopLevelVariableDeclaration variableDeclaration = (TopLevelVariableDeclaration) list.getParent();
        addAnnotations(annotationList, variableDeclaration.getMetadata());
      }
    }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.ast.FieldDeclaration

Copyright © 2018 www.massapicom. 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.