Package com.google.dart.engine.element

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


   * {@link AngularElement}, or {@code null} otherwise.
   */
  public static AngularElement getAngularElement(Element element) {
    // may be artificial local variable, replace with AngularElement
    if (element instanceof LocalVariableElement) {
      LocalVariableElement local = (LocalVariableElement) element;
      ToolkitObjectElement[] toolkitObjects = local.getToolkitObjects();
      if (toolkitObjects.length == 1 && toolkitObjects[0] instanceof AngularElement) {
        return (AngularElement) toolkitObjects[0];
      }
    }
    // not a special Element
View Full Code Here


  @Override
  public Void visitCatchClause(CatchClause node) {
    SimpleIdentifier exceptionParameter = node.getExceptionParameter();
    if (exceptionParameter != null) {
      LocalVariableElement[] localVariables = enclosingExecutable.getLocalVariables();
      LocalVariableElement exceptionElement = findIdentifier(localVariables, exceptionParameter);
      processElement(exceptionElement);

      SimpleIdentifier stackTraceParameter = node.getStackTraceParameter();
      if (stackTraceParameter != null) {
        LocalVariableElement stackTraceElement = findIdentifier(localVariables, stackTraceParameter);
        processElement(stackTraceElement);
      }
    }
    return super.visitCatchClause(node);
  }
View Full Code Here

  }

  @Override
  public Void visitDeclaredIdentifier(DeclaredIdentifier node) {
    SimpleIdentifier variableName = node.getIdentifier();
    LocalVariableElement element = findIdentifier(
        enclosingExecutable.getLocalVariables(),
        variableName);
    processElement(element);
    return super.visitDeclaredIdentifier(node);
  }
View Full Code Here

    Statement body = node.getBody();
    if (body != null) {
      overrideManager.enterScope();
      try {
        if (loopVariable != null && iterator != null) {
          LocalVariableElement loopElement = loopVariable.getElement();
          if (loopElement != null) {
            Type iteratorElementType = getIteratorElementType(iterator);
            overrideVariable(loopElement, iteratorElementType, true);
            recordPropagatedType(loopVariable.getIdentifier(), iteratorElementType);
          }
View Full Code Here

    SimpleIdentifier methodNameNode = node.getMethodName();
    Element staticMethodElement = methodNameNode.getStaticElement();

    // Record types of the local variable invoked as a function.
    if (staticMethodElement instanceof LocalVariableElement) {
      LocalVariableElement variable = (LocalVariableElement) staticMethodElement;
      Type staticType = variable.getType();
      recordStaticType(methodNameNode, staticType);
      Type propagatedType = overrideManager.getType(variable);
      if (propagatedType != null && propagatedType.isMoreSpecificThan(staticType)) {
        recordPropagatedType(methodNameNode, propagatedType);
      }
View Full Code Here

TOP

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

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.