Examples of AddRef()


Examples of com.google.javascript.jscomp.GlobalNamespace.Name.addRef()

  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());
    assertEquals(1, n.globalSets);
    assertEquals(1, n.localSets);
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Name.addRef()

    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());
    assertEquals(1, n.globalSets);
    assertEquals(1, n.localSets);
    assertEquals(2, n.getRefs().size());
View Full Code Here

Examples of com.google.javascript.jscomp.GlobalNamespace.Name.addRef()

      if (isJsIdentifier && p != null) {
        if (!discardKeys) {
          Ref newAlias =
              p.getDeclaration().cloneAndReclassify(Ref.Type.ALIASING_GET);
          newAlias.node = refNode;
          p.addRef(newAlias);
        }

        p.getDeclaration().node = nameNode;

        if (value.getType() == Token.FUNCTION) {
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.spring.SpringConstructorArgElement.addRef()

                              property.addRef(reader.getAttributeValue(null, "ref"));
                            bean.addProperty(property);
                        } else if (SpringImplementationConstants.CONSTRUCTORARG_ELEMENT.equals(qname)) {
                            constructorArg = new SpringConstructorArgElement(reader.getAttributeValue(null, "type"));
                            if (reader.getAttributeValue(null, "ref") != null)
                              constructorArg.addRef(reader.getAttributeValue(null, "ref"));
                            if (reader.getAttributeValue(null, "index") != null)
                              constructorArg.setIndex((new Integer(reader.getAttributeValue(null, "index"))).intValue());
                            if (reader.getAttributeValue(null, "value") != null)
                              constructorArg.addValue(reader.getAttributeValue(null, "value"));
                            bean.addCustructorArgs(constructorArg);
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.spring.SpringConstructorArgElement.addRef()

                        } else if (SpringImplementationConstants.REF_ELEMENT.equals(qname)) {
                          String ref = reader.getAttributeValue(null, "bean");                           
                            // Check if the parent element is a property
                            if (property != null) property.addRef(ref);
                            // Check if the parent element is a constructor-arg
                            if (constructorArg != null) constructorArg.addRef(ref);
                        } else if (SpringImplementationConstants.VALUE_ELEMENT.equals(qname)) {
                            String value = reader.getElementText();
                            // Check if the parent element is a constructor-arg
                            if (constructorArg != null) constructorArg.addValue(value);
                        } else if (SpringImplementationConstants.LIST_ELEMENT.equals(qname) ||
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.spring.SpringPropertyElement.addRef()

                            beans.add(innerbean);
                            readBeanDefinition(reader, innerbean, beans);
                        } else if (SpringImplementationConstants.PROPERTY_ELEMENT.equals(qname)) {
                            property = new SpringPropertyElement(reader.getAttributeValue(null, "name"));
                            if (reader.getAttributeValue(null, "ref") != null)
                              property.addRef(reader.getAttributeValue(null, "ref"));
                            bean.addProperty(property);
                        } else if (SpringImplementationConstants.CONSTRUCTORARG_ELEMENT.equals(qname)) {
                            constructorArg = new SpringConstructorArgElement(reader.getAttributeValue(null, "type"));
                            if (reader.getAttributeValue(null, "ref") != null)
                              constructorArg.addRef(reader.getAttributeValue(null, "ref"));
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.spring.SpringPropertyElement.addRef()

                              constructorArg.addValue(reader.getAttributeValue(null, "value"));
                            bean.addCustructorArgs(constructorArg);
                        } else if (SpringImplementationConstants.REF_ELEMENT.equals(qname)) {
                          String ref = reader.getAttributeValue(null, "bean");                           
                            // Check if the parent element is a property
                            if (property != null) property.addRef(ref);
                            // Check if the parent element is a constructor-arg
                            if (constructorArg != null) constructorArg.addRef(ref);
                        } else if (SpringImplementationConstants.VALUE_ELEMENT.equals(qname)) {
                            String value = reader.getElementText();
                            // Check if the parent element is a constructor-arg
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch.AddRef()

            if (dispMethod == null || dispMethod.refCount < 1) {
              dispMethod = new MethodDispatch(classLoader, dispIdOracle, method);
              WrappersCache.putWrapperForObject(classLoader, obj, dispMethod);
            }
            IDispatch disp = new IDispatch(dispMethod.getAddress());
            disp.AddRef();
            return new Variant(disp);
          }
        } else if (javaDispatch.isField(dispId)) {
          Field field = javaDispatch.getField(dispId);
          if (flags == COM.DISPATCH_PROPERTYGET) {
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch.AddRef()

          if (dispMethod == null || dispMethod.refCount < 1) {
            dispMethod = new MethodDispatch(classLoader, dispIdOracle, toStringMethod);
            WrappersCache.putWrapperForObject(classLoader, obj, dispMethod);
          }
          IDispatch disp = new IDispatch(dispMethod.getAddress());
          disp.AddRef();
          return new Variant(disp);
        }
        break;
      case 2 :
        // call
View Full Code Here

Examples of org.eclipse.swt.internal.ole.win32.IDispatch.AddRef()

              @Override
              protected void getIDsOfNames(String[] names, int[] ids) throws HResultException {
              }
            };
            IDispatch disp = new IDispatch(funcObj.getAddress());
            disp.AddRef();
            return new Variant(disp);
          } catch (Exception e) {
            // just return VT_EMPTY
            return new Variant();
          }
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.