Examples of Struct


Examples of aQute.lib.struct

    void resolve(Object rover) throws Exception {
      if (rover == null)
        return;

      if (rover instanceof struct) {
        struct struct = (struct) rover;

        for (Field f : struct.fields()) {
          Object o = f.get(struct);

          if (o == null)
            continue;
View Full Code Here

Examples of aQute.struct

    void resolve(Object rover) throws Exception {
      if (rover == null)
        return;

      if (rover instanceof struct) {
        struct struct = (struct) rover;

        for (Field f : struct.fields()) {
          Object o = f.get(struct);

          if (o == null)
            continue;
View Full Code Here

Examples of aQute.struct.struct

    void resolve(Object rover) throws Exception {
      if (rover == null)
        return;

      if (rover instanceof struct) {
        struct struct = (struct) rover;

        for (Field f : struct.fields()) {
          Object o = f.get(struct);

          if (o == null)
            continue;
View Full Code Here

Examples of com.facebook.swift.parser.model.Struct

    }

    @Override
    public void visit(final Visitable visitable) throws IOException
    {
        final Struct struct = Struct.class.cast(visitable);
        final StructContext structContext = contextGenerator.structFromThrift(struct);

        for (final ThriftField field : struct.getFields()) {
            structContext.addField(contextGenerator.fieldFromThrift(field));
        }

        render(structContext, "struct");
    }
View Full Code Here

Examples of com.xmlit.project.engine.struct.Struct

  }

  public static Struct getStruct(TreeGrid treeGrid, TreeNode rootNode,
      Struct parent) {
    Struct current = null;
    if (Main.Sequence.equals(rootNode.getAttribute(Type))) {
      current = new StructSequenceImpl(rootNode.getAttribute(Name));
      ((StructSequenceImpl) current).setDelimiter(handleEscape(rootNode
          .getAttribute(Delimiter)));
      ((StructSequenceImpl) current).setLookahead(handleEscape(rootNode
          .getAttribute(Lookahead)));

      ((StructSequenceImpl) current).setNegative(rootNode
          .getAttributeAsBoolean(Not));

    } else if (Main.Choice.equals(rootNode.getAttribute(Type))) {
      current = new StructChoiceImpl(rootNode.getAttribute(Name));
    } else {
      current = new StructSimpleImpl(rootNode.getAttribute(Name));
      ((StructSimpleImpl) current).setSimplePattern(handleEscape(rootNode
          .getAttribute(Regex)));
      ((StructSimpleImpl) current).setAllowedChars(handleEscape(rootNode
          .getAttribute(AllowedChars)));
      ((StructSimpleImpl) current).setAllowedValues(handleEscape(rootNode
          .getAttribute(AllowedValues)));
      if (rootNode.getAttribute(minLength) != null)
        ((StructSimpleImpl) current).setMinLength(Integer
            .parseInt(rootNode.getAttribute(minLength)));
      if (rootNode.getAttribute(maxLength) != null)
        ((StructSimpleImpl) current).setMaxLength(Integer
            .parseInt(rootNode.getAttribute(maxLength)));
    }
    if (parent != null) {
      parent.addChild(current);
    }
    if (rootNode.getAttributeAsDouble(Min) != null)
      current.setMinOccurrences(rootNode.getAttributeAsDouble(Min)
          .intValue());
    if (rootNode.getAttributeAsDouble(Max) != null)
      current.setMaxOccurrences(rootNode.getAttributeAsDouble(Max)
          .intValue());

    current.setPrefix(handleEscape(rootNode.getAttribute(Prefix)));
    current.setSuffix(handleEscape(rootNode.getAttribute(Suffix)));

    for (TreeNode node : treeGrid.getTree().getChildren(rootNode)) {
      getStruct(treeGrid, node, current);
    }
View Full Code Here

Examples of etch.compiler.ast.Struct

   
    Named<?> named = p.type().getNamed( service );
    if (named == null || !named.isStruct())
      return null;
   
    Struct s = (Struct) named;
   
    p = s.getParameter( name );
    if (p == null)
      return null;
   
    return getField( service, p, path );
  }
View Full Code Here

Examples of java.sql.Struct

          System.out.println("\t" + arr.getBaseTypeName());
          ResultSet rs2 = arr.getResultSet();
          while(rs2.next())
          {
            System.out.println("\t" + rs2.getObject(1));
            Struct struct = (Struct) rs2.getObject(2);
            System.out.println(Arrays.toString(struct.getAttributes()));
          }
          rs2.close();
        }
      }
    }
View Full Code Here

Examples of java.sql.Struct

          while (arrayResultSet.next())
          {
            // Get the underlying structure from the database. Oracle returns the structure in the
            // second column of the array's ResultSet
            Struct struct = (Struct) arrayResultSet.getObject(2);
            Object[] attributes = struct.getAttributes();

            GenericRecord avroElement = avroArray.get(i++);

            // Iterate over the fields in the JSON array of fields.
            // We can read the structure elements only by position, not by field name, so we
View Full Code Here

Examples of java.sql.Struct

          GenericRecord elemRecord = new GenericData.Record(elementSchema);
          avroArray.add(elemRecord);

          // Get the underlying structure from the database. Oracle returns the structure in the
          // second column of the array's ResultSet
          Struct struct = (Struct) arrayResultSet.getObject(2);
          putOracleRecord(elemRecord, elementSchema, struct);
        }
      }
      finally
      {
View Full Code Here

Examples of jnr.ffi.Struct

    }

    @Override
    public Struct fromNative(Pointer nativeValue, FromNativeContext context) {
        try {
            Struct s = constructor.newInstance(context.getRuntime());
            s.useMemory(nativeValue);
            return s;
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
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.