Package com.google.dart.engine.element

Examples of com.google.dart.engine.element.ExecutableElement


    return null;
  }

  @Override
  public Void visitConstructorDeclaration(ConstructorDeclaration node) {
    ExecutableElement outerFunction = enclosingFunction;
    try {
      enclosingFunction = node.getElement();
      super.visitConstructorDeclaration(node);
    } finally {
      enclosingFunction = outerFunction;
View Full Code Here


    return null;
  }

  @Override
  public Void visitFunctionDeclaration(FunctionDeclaration node) {
    ExecutableElement outerFunction = enclosingFunction;
    try {
      SimpleIdentifier functionName = node.getName();
      enclosingFunction = (ExecutableElement) functionName.getStaticElement();
      super.visitFunctionDeclaration(node);
    } finally {
View Full Code Here

    return null;
  }

  @Override
  public Void visitFunctionExpression(FunctionExpression node) {
    ExecutableElement outerFunction = enclosingFunction;
    try {
      enclosingFunction = node.getElement();
      overrideManager.enterScope();
      try {
        super.visitFunctionExpression(node);
View Full Code Here

    return null;
  }

  @Override
  public Void visitMethodDeclaration(MethodDeclaration node) {
    ExecutableElement outerFunction = enclosingFunction;
    try {
      enclosingFunction = node.getElement();
      super.visitMethodDeclaration(node);
    } finally {
      enclosingFunction = outerFunction;
View Full Code Here

    return null;
  }

  @Override
  public Void visitFunctionDeclaration(FunctionDeclaration node) {
    ExecutableElement outerFunction = enclosingFunction;
    try {
      enclosingFunction = node.getElement();
      return super.visitFunctionDeclaration(node);
    } finally {
      enclosingFunction = outerFunction;
View Full Code Here

  }

  @Override
  public Void visitFunctionExpression(FunctionExpression node) {
    if (!(node.getParent() instanceof FunctionDeclaration)) {
      ExecutableElement outerFunction = enclosingFunction;
      try {
        enclosingFunction = node.getElement();
        return super.visitFunctionExpression(node);
      } finally {
        enclosingFunction = outerFunction;
View Full Code Here

    return null;
  }

  @Override
  public Void visitFunctionDeclaration(FunctionDeclaration node) {
    ExecutableElement functionElement = node.getElement();
    Scope outerScope = nameScope;
    try {
      if (functionElement == null) {
        AnalysisEngine.getInstance().getLogger().logInformation(
            "Missing element for top-level function " + node.getName().getName() + " in "
                + getDefiningLibrary().getSource().getFullName(),
            new Exception());
      } else {
        nameScope = new FunctionScope(nameScope, functionElement);
      }
      super.visitFunctionDeclaration(node);
    } finally {
      nameScope = outerScope;
    }
    if (functionElement != null
        && !(functionElement.getEnclosingElement() instanceof CompilationUnitElement)) {
      nameScope.define(functionElement);
    }
    return null;
  }
View Full Code Here

      // We have already created a function scope and don't need to do so again.
      super.visitFunctionExpression(node);
    } else {
      Scope outerScope = nameScope;
      try {
        ExecutableElement functionElement = node.getElement();
        if (functionElement == null) {
          StringBuilder builder = new StringBuilder();
          builder.append("Missing element for function ");
          AstNode parent = node.getParent();
          while (parent != null) {
View Full Code Here

  @Override
  public Void visitMethodDeclaration(MethodDeclaration node) {
    Scope outerScope = nameScope;
    try {
      ExecutableElement methodElement = node.getElement();
      if (methodElement == null) {
        AnalysisEngine.getInstance().getLogger().logInformation(
            "Missing element for method " + node.getName().getName() + " in "
                + getDefiningLibrary().getSource().getFullName(),
            new Exception());
View Full Code Here

        }
        overrideType = propagatedType;
      }
      resolver.overrideExpression(node.getLeftHandSide(), overrideType, true);
    } else {
      ExecutableElement staticMethodElement = node.getStaticElement();
      Type staticType = computeStaticReturnType(staticMethodElement);
      recordStaticType(node, staticType);

      MethodElement propagatedMethodElement = node.getPropagatedElement();
      if (propagatedMethodElement != staticMethodElement) {
View Full Code Here

TOP

Related Classes of com.google.dart.engine.element.ExecutableElement

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.