Examples of Property


Examples of com.getperka.flatpack.ext.Property

    if (stack.isEmpty()) {
      return true;
    }

    State state = stack.peek();
    Property prop = state.property;
    if (prop.isEmbedded()) {
      // Embedded properties should immediately traverse into the related entity
      return true;
    }

    // Write the value of the property, optionally suppressing default values
    if (prop.isSuppressDefaultValue() && codex.isDefaultValue(value)) {
      return false;
    }

    // Write the name and defer to the codex to write the JSON value
    try {
      context.getWriter().name(prop.getName() + codex.getPropertySuffix());
    } catch (IOException e) {
      context.fail(e);
    }
    codex.write(value, context);
View Full Code Here

Examples of com.github.sardine.model.Property

    {
      case HREF:
        p.setHref(principal.getValue());
        break;
      case PROPERTY:
        p.setProperty(new Property());
        p.getProperty().setProperty(SardineUtil.createElement(principal.getProperty()));
        break;
      case KEY:
        if (DavPrincipal.KEY_ALL.equals(principal.getValue()))
        {
View Full Code Here

Examples of com.google.api.services.drive.model.Property

    final int length = metadata.length();
    int partCounter = 0;
    // max 118 bytes (key+value)
    for (int i = 0; i < length; i += 100, partCounter++) {
      final String part = metadata.substring(i, Math.min(length, i + 100));
      final Property property = new Property();
      property.setKey("metadata" + partCounter);
      property.setValue(part);
      property.setVisibility("PRIVATE");
      properties.add(property);
    }
    driveItem.setProperties(properties);

    driveItem.setMimeType(item.isType(ItemType.FOLDER) ? FOLDER : FILE);
View Full Code Here

Examples of com.google.appengine.tck.event.Property

        TestLifecycles.before(event);
        return event.execute();
    }

    protected boolean required(String propertyName) {
        Property result = property(propertyName);
        Boolean required = result.required();
        return (required == null || required); // by default null means it's required
    }
View Full Code Here

Examples of com.google.enterprise.connector.spi.Property

    NotesDocumentMock crawlDoc = new NotesDocumentMock();
    crawlDoc.addItem(new NotesItemMock("name", "x.foo", "type", NotesItem.TEXT,
            "values", "this is the text for field foo"));
    doc.crawlDoc = crawlDoc;
    doc.setMetaFields();
    Property p = doc.findProperty("foo");
    assertNotNull("property foo missing", p);
    Value v = p.nextValue();
    assertNotNull("property foo value missing", v);
    assertEquals("property foo", "this is the text for field foo",
        v.toString());
    assertNull(p.nextValue());
  }
View Full Code Here

Examples of com.google.gwt.dev.cfg.Property

  void compileForWebMode(ModuleDef module, String... userAgents)
      throws UnableToCompleteException {
    if (userAgents != null && userAgents.length > 0) {
      Properties props = module.getProperties();
      Property userAgent = props.find("user.agent");
      if (userAgent instanceof BindingProperty) {
        BindingProperty bindingProperty = (BindingProperty) userAgent;
        bindingProperty.setAllowedValues(bindingProperty.getRootCondition(),
            userAgents);
      }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JAnnotation.Property

      for (ElementValuePair pair : elementValuePairs) {
        String name = CharOperation.charToString(pair.getName());
        List<JAnnotationArgument> values = processAnnotationPropertyValue(
            sourceInfo, pair.getValue());
        annotation.addValue(new Property(sourceInfo, name, values));
      }
    }
View Full Code Here

Examples of com.google.javascript.jscomp.AnalyzePrototypeProperties.Property

      while (declarations.hasNext()) {
        Symbol symbol = declarations.next();
        if (!(symbol instanceof Property)) {
          continue;
        }
        Property prop = (Property) symbol;

        // We should only move a property across modules if:
        // 1) We can move it deeper in the module graph, and
        // 2) it's a function, and
        // 3) it is not a GETTER_DEF or a SETTER_DEF, and
        // 4) the class is available in the global scope.
        //
        // #1 should be obvious. #2 is more subtle. It's possible
        // to copy off of a prototype, as in the code:
        // for (var k in Foo.prototype) {
        //   doSomethingWith(Foo.prototype[k]);
        // }
        // This is a common way to implement pseudo-multiple inheritance in JS.
        //
        // So if we move a prototype method into a deeper module, we must
        // replace it with a stub function so that it preserves its original
        // behavior.
        if (prop.getRootVar() == null || !prop.getRootVar().isGlobal()) {
          continue;
        }

        Node value = prop.getValue();
        // Only attempt to move normal functions.
        if (!value.isFunction()
            // A GET or SET can't be deferred like a normal
            // FUNCTION property definition as a mix-in would get the result
            // of a GET instead of the function itself.
            || value.getParent().isGetterDef()
            || value.getParent().isSetterDef()) {
          continue;
        }

        if (moduleGraph.dependsOn(deepestCommonModuleRef, prop.getModule())) {
          if (hasUnmovableRedeclaration(nameInfo, prop)) {
            // If it has been redeclared on the same object, skip it.
            continue;
          }

          Node valueParent = value.getParent();
          Node proto = prop.getPrototype();
          int stubId = idGenerator.newId();

          // example: JSCompiler_stubMethod(id);
          Node stubCall = IR.call(
              IR.name(STUB_METHOD_NAME),
View Full Code Here

Examples of com.google.javascript.rhino.jstype.ObjectType.Property

    return slot.getType();
  }

  @Override
  public boolean isPropertyInExterns(String propertyName) {
    Property p = properties.get(propertyName);
    if (p != null) {
      return p.isFromExterns();
    }
    ObjectType implicitPrototype = getImplicitPrototype();
    if (implicitPrototype != null) {
      return implicitPrototype.isPropertyInExterns(propertyName);
    }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.Property

    private void finishConstructorDefinition(
        Node n, String variableName, FunctionType fnType,
        Scope scopeToDeclareIn, CompilerInput input, Var newVar) {
      // Declare var.prototype in the scope chain.
      FunctionType superClassCtor = fnType.getSuperClassConstructor();
      Property prototypeSlot = fnType.getSlot("prototype");

      // When we declare the function prototype implicitly, we
      // want to make sure that the function and its prototype
      // are declared at the same node. We also want to make sure
      // that the if a symbol has both a Var and a JSType, they have
      // the same node.
      //
      // This consistency is helpful to users of SymbolTable,
      // because everything gets declared at the same place.
      prototypeSlot.setNode(n);

      String prototypeName = variableName + ".prototype";

      // There are some rare cases where the prototype will already
      // be declared. See TypedScopeCreatorTest#testBogusPrototypeInit.
      // Fortunately, other warnings will complain if this happens.
      Var prototypeVar = scopeToDeclareIn.getVar(prototypeName);
      if (prototypeVar != null && prototypeVar.scope == scopeToDeclareIn) {
        scopeToDeclareIn.undeclare(prototypeVar);
      }

      scopeToDeclareIn.declare(prototypeName,
          n, prototypeSlot.getType(), input,
          /* declared iff there's an explicit supertype */
          superClassCtor == null ||
          superClassCtor.getInstanceType().isEquivalentTo(
              getNativeType(OBJECT_TYPE)));

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.