Examples of Ref


Examples of clojure.lang.Ref

    public static class ClojureObject extends RubyObject {
        public ClojureObject(Ruby runtime, RubyClass klass) {
            super(runtime, klass);
            try {
                variableTable = new Ref(PersistentVector.EMPTY);
            } catch (Exception e) {
                throw runtime.newConcurrencyError(e.getLocalizedMessage());
            }
        }
View Full Code Here

Examples of com.bramosystems.oss.player.playlist.client.asx.Ref

                        }
                    }
                    break;
                case _ref:
                    parentNodes.push(ASXNodeNames._ref);
                    ref = new Ref();
                    it = attr.keySet().iterator();
                    while (it.hasNext()) {
                        String ky = it.next();
                        if (ky.equalsIgnoreCase("href")) {
                            ref.setHref(attr.get(ky));
View Full Code Here

Examples of com.google.gwt.dev.javac.Dependencies.Ref

    assertSame(unit, compiledClass.getUnit());
  }

  private void assertObjectInDeps(Map<String, Ref> qualified,
      Map<String, Ref> simple, String qualifiedName, String simpleName) {
    Ref qualifiedRef = qualified.get(qualifiedName);
    assertNotNull(qualifiedRef);
    assertEquals(qualifiedName, qualifiedRef.getInternalName().replace("/", "."));
    Ref simpleRef = simple.get(simpleName);
    assertNotNull(simpleRef);
    assertEquals(qualifiedName,simpleRef.getInternalName().replace("/", "."));
  }
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

*/
public class GlobalNamespaceTest extends TestCase {

  public void testRemoveDeclaration1() {
    Name n = new Name("a", null, false);
    Ref set1 = createNodelessRef(Ref.Type.SET_FROM_GLOBAL);
    Ref set2 = createNodelessRef(Ref.Type.SET_FROM_GLOBAL);

    n.addRef(set1);
    n.addRef(set2);

    assertEquals(set1, n.getDeclaration());
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

    assertEquals(1, n.getRefs().size());
  }

  public void testRemoveDeclaration2() {
    Name n = new Name("a", null, false);
    Ref set1 = createNodelessRef(Ref.Type.SET_FROM_GLOBAL);
    Ref set2 = createNodelessRef(Ref.Type.SET_FROM_LOCAL);

    n.addRef(set1);
    n.addRef(set2);

    assertEquals(set1, n.getDeclaration());
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

  }

  private void validateName(Name name, boolean isDefined) {
    // If the name is not defined, emit warnings for each reference. While
    // we're looking through each reference, check all the module dependencies.
    Ref declaration = name.getDeclaration();
    Name parent = name.parent;

    JSModuleGraph moduleGraph = compiler.getModuleGraph();
    for (Ref ref : name.getRefs()) {
      // Don't worry about global exprs.
      boolean isGlobalExpr = ref.getNode().getParent().isExprResult();

      if (!isDefined && !isTypedef(ref)) {
        if (!isGlobalExpr) {
          reportRefToUndefinedName(name, ref);
        }
      } else if (declaration != null &&
          ref.getModule() != declaration.getModule() &&
          !moduleGraph.dependsOn(
              ref.getModule(), declaration.getModule())) {
        reportBadModuleReference(name, ref);
      } else {
        // Check for late references.
        if (ref.scope.isGlobal()) {
          // Prototype references are special, because in our reference graph,
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

  private Map<String, DefineInfo> collectDefines(Node root,
      GlobalNamespace namespace) {
    // Find all the global names with a @define annotation
    List<Name> allDefines = Lists.newArrayList();
    for (Name name : namespace.getNameIndex().values()) {
      Ref decl = name.getDeclaration();
      if (name.docInfo != null && name.docInfo.isDefine()) {
        // Process defines should not depend on check types being enabled,
        // so we look for the JSDoc instead of the inferred type.
        if (isValidDefineType(name.docInfo.getType())) {
          allDefines.add(name);
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

      assignAllowed.push(1);

      // Create a map of references to defines keyed by node for easy lookup
      allRefInfo = Maps.newHashMap();
      for (Name name : listOfDefines) {
        Ref decl = name.getDeclaration();
        if (decl != null) {
          allRefInfo.put(decl.node,
                         new RefInfo(decl, name));
        }
        for (Ref ref : name.getRefs()) {
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Ref

    @Override
    public void visit(NodeTraversal t, Node n, Node parent) {
      RefInfo refInfo = allRefInfo.get(n);
      if (refInfo != null) {
        Ref ref = refInfo.ref;
        Name name = refInfo.name;
        String fullName = name.getFullName();
        switch (ref.type) {
          case SET_FROM_GLOBAL:
          case SET_FROM_LOCAL:
View Full Code Here

Examples of com.intellij.openapi.util.Ref

    };

    String commandName = getTemplatePresentation().getText();
    if (commandName == null) commandName = "";
    // use new Ref() here to avoid merging two consequential commands, and, in the same time, pass along the Document
    commandProcessor.executeCommand(editor.getProject(), command, commandName, new Ref(editor.getDocument()));
  }
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.