Examples of Table


Examples of kiss.Table

     *
     * @param clazz A target class.
     * @return A table of method and annnotations.
     */
    public static Table<Method, Annotation> getAnnotations(Class clazz) {
        Table<Method, Annotation> table = new Table();

        for (Class type : ClassUtil.getTypes(clazz)) {
            for (Method method : type.getDeclaredMethods()) {
                // exclude the method which is created by compiler
                // exclude the private method which is not declared in the specified class
                if (!method.isBridge() && !method.isSynthetic() && (((method.getModifiers() & Modifier.PRIVATE) == 0) || method.getDeclaringClass() == clazz)) {
                    Annotation[] annotations = method.getAnnotations();

                    if (annotations.length != 0) {
                        List<Annotation> list = new ArrayList();

                        // disclose container annotation
                        for (Annotation annotation : annotations) {
                            try {
                                Class annotationType = annotation.annotationType();
                                Method value = annotationType.getMethod("value");
                                Class returnType = value.getReturnType();

                                if (returnType.isArray()) {
                                    Class<?> componentType = returnType.getComponentType();
                                    Repeatable repeatable = componentType.getAnnotation(Repeatable.class);

                                    if (repeatable != null && repeatable.value() == annotationType) {
                                        value.setAccessible(true);

                                        Annotation[] items = (Annotation[]) value.invoke(annotation);

                                        for (Annotation item : items) {
                                            list.add(item);
                                        }
                                        continue;
                                    }
                                }
                            } catch (Exception e) {
                                // do nothing
                            }
                            list.add(annotation);
                        }

                        // check method overriding
                        for (Method candidate : table.keySet()) {
                            if (candidate.getName().equals(method.getName()) && Arrays.deepEquals(candidate.getParameterTypes(), method.getParameterTypes())) {
                                method = candidate; // detect overriding
                                break;
                            }
                        }

                        add: for (Annotation annotation : list) {
                            Class annotationType = annotation.annotationType();

                            if (!annotationType.isAnnotationPresent(Repeatable.class)) {
                                for (Annotation item : table.get(method)) {
                                    if (item.annotationType() == annotationType) {
                                        continue add;
                                    }
                                }
                            }

                            table.push(method, annotation);
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of liquibase.structure.core.Table

    }

    @Test
    public void appliesTo() {
        ChangeMetaData metaData = new ChangeMetaData("x", "y", 5, new String[] {"table", "column"}, null, null);
        assertTrue(metaData.appliesTo(new Table()));
        assertTrue(metaData.appliesTo(new Column()));
        assertFalse(metaData.appliesTo(new View()));
    }
View Full Code Here

Examples of loxia.struts2.taglib.model.Table

    protected String cellspacing;

  @Override
  public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
    // TODO Auto-generated method stub
    return new Table(stack,req,res);
  }
View Full Code Here

Examples of mage.game.Table

    }
  }

  @Override
  public TableView createTable(UUID sessionId, String gameType, String deckType, List<String> playerTypes, MultiplayerAttackOption attackOption, RangeOfInfluence range) {
    Table table = TableManager.getInstance().createTable(sessionId, gameType, deckType, playerTypes, attackOption, range);
    tables.put(table.getId(), table);
    return new TableView(table);
  }
View Full Code Here

Examples of mymadrid.soccer.Table

    if (getComparisonValue(row1) < getComparisonValue(row2))
      return -1;
    if (getComparisonValue(row1) > getComparisonValue(row2))
      return 1;
    if (child != null) {
      Table mainTable = row1.getOuterTable();
      Table subTable = new Table(child, mainTable);
      for (Row row : mainTable.getRows()) {
        if (getComparisonValue(row1) == getComparisonValue(row))
          subTable.addTeam(row.getTeam());
      }
      for (Match match : mainTable.getMatches()) {
        if (subTable.getRow(match.getHomeTeam()) != null && subTable.getRow(match.getGuestTeam()) != null)
          subTable.addMatch(match);
      }
      subTable.refresh();
      if (mainTable.isShowSubTables()) {
        ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();
        PrintStream printStream = new PrintStream(byteArrayStream);
        subTable.print(printStream, true);
        mainTable.addDumpedSubTable(byteArrayStream.toString());
      }
      int result = child.compare(subTable.getRow(row1.getTeam()), subTable.getRow(row2.getTeam()));
      if (result != 0)
        return result;
    }
    if (successor != null)
      return successor.compare(row1, row2);
View Full Code Here

Examples of net.hydromatic.optiq.Table

        Frameworks.withPlanner(new Frameworks.PlannerAction<RelNode>() {
          public RelNode apply(RelOptCluster cluster,
              RelOptSchema relOptSchema,
              SchemaPlus rootSchema) {
            final RelDataTypeFactory typeFactory = cluster.getTypeFactory();
            final Table table = new AbstractTable() {
              public RelDataType getRowType(RelDataTypeFactory typeFactory) {
                final RelDataType stringType =
                    typeFactory.createJavaType(String.class);
                final RelDataType integerType =
                    typeFactory.createJavaType(Integer.class);
                return typeFactory.builder()
                    .add("s", stringType)
                    .add("i", integerType)
                    .build();
              }
            };

            // "SELECT * FROM myTable"
            final RelOptAbstractTable relOptTable = new RelOptAbstractTable(
                relOptSchema,
                "myTable",
                table.getRowType(typeFactory)) {
            };
            final JavaRules.EnumerableTableAccessRel tableRel =
                new JavaRules.EnumerableTableAccessRel(
                    cluster, cluster.traitSetOf(EnumerableConvention.INSTANCE),
                    relOptTable, Object[].class);
View Full Code Here

Examples of net.laubenberger.bogatyr.view.swing.Table

    final JTabbedPane tab = new PaneTab();
   
   
   
    final JTable taApplication = new Table(HelperMap.toArray(view.getController().getReport()), new String[]{localizer.getValue(HelperResource.RES_LABEL_KEY), localizer.getValue(HelperResource.RES_LABEL_VALUE)}){
      private static final long serialVersionUID = 5956530506987984746L;

      @Override
      public boolean isCellEditable(final int rowIndex, final int colIndex) {
        return false;
      }
    };
   
    final JScrollPane scrollApplication = new PaneScroll(taApplication);
    tab.addTab(localizer.getValue(HelperResource.RES_LABEL_APPLICATION), view.getController().getScaledIcon(Icon.LOGO), scrollApplication, localizer.getTooltip(HelperResource.RES_LABEL_APPLICATION));

   
   
    final JTable taJava = new Table(HelperMap.toArray(HelperEnvironment.getReportJava()), new String[]{localizer.getValue(HelperResource.RES_LABEL_KEY), localizer.getValue(HelperResource.RES_LABEL_VALUE)}) {
      private static final long serialVersionUID = 5956530506987984746L;

      @Override
      public boolean isCellEditable(final int rowIndex, final int colIndex) {
        return false;
      }
    };

    final JScrollPane scrollJava = new PaneScroll(taJava);
    tab.addTab(localizer.getValue(HelperResource.RES_LABEL_JAVA), view.getController().getScaledIcon(Icon.JAVA), scrollJava, localizer.getTooltip(HelperResource.RES_LABEL_JAVA));

    final JTable taOS = new Table(HelperMap.toArray(HelperEnvironment.getReportOS()), new String[]{localizer.getValue(HelperResource.RES_LABEL_KEY), localizer.getValue(HelperResource.RES_LABEL_VALUE)}) {
      private static final long serialVersionUID = 5956530506987984746L;

      @Override
      public boolean isCellEditable(final int rowIndex, final int colIndex) {
        return false;
      }
    };
   
    final JScrollPane scrollOS = new PaneScroll(taOS);
    final ImageIcon iconOS;
    if (Platform.MAC_OSX == HelperEnvironment.getPlatform()) {
      iconOS = view.getController().getScaledIcon(Icon.MAC);
    } else
      iconOS = Platform.WINDOWS == HelperEnvironment.getPlatform() ? view.getController().getScaledIcon(Icon.WINDOWS) : view.getController().getScaledIcon(Icon.LINUX);
   
    tab.addTab(localizer.getValue(HelperResource.RES_LABEL_OS), iconOS, scrollOS, localizer.getTooltip(HelperResource.RES_LABEL_OS));

   
   
    final JTable taSystem = new Table(HelperMap.toArray(HelperEnvironment.getReportSystem()), new String[]{localizer.getValue(HelperResource.RES_LABEL_KEY), localizer.getValue(HelperResource.RES_LABEL_VALUE)}) {
      private static final long serialVersionUID = -8531838594552715361L;

      @Override
      public boolean isCellEditable(final int rowIndex, final int colIndex) {
        return false;
      }
    };
   
    final JScrollPane scrollSystem = new PaneScroll(taSystem);
    tab.addTab(localizer.getValue(HelperResource.RES_LABEL_SYSTEM), view.getController().getScaledIcon(Icon.SYSTEM), scrollSystem, localizer.getTooltip(HelperResource.RES_LABEL_SYSTEM));


    final JTable taUser = new Table(HelperMap.toArray(HelperEnvironment.getReportUser()), new String[]{localizer.getValue(HelperResource.RES_LABEL_KEY), localizer.getValue(HelperResource.RES_LABEL_VALUE)}){
      private static final long serialVersionUID = 1327561378424760584L;

      @Override
      public boolean isCellEditable(final int rowIndex, final int colIndex) {
        return false;
View Full Code Here

Examples of net.sf.jsqlparser.schema.Table

    public SelingerSelectivityEstimatorTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        Table table = new Table();
        table.setName("ORDERS");
        List<Table> tableList = new ArrayList<Table>(Arrays.asList(table));

        _columnOrderdate = new Column();
        _columnOrderdate.setTable(table);
        _columnOrderdate.setColumnName("ORDERDATE");
View Full Code Here

Examples of net.sf.minuteProject.configuration.bean.model.data.Table

          error = false;
          org.apache.ddlutils.model.ForeignKey foreignKeyddlutils = table.getForeignKeys()[i];
          org.apache.ddlutils.model.Reference referenceddlutils = foreignKeyddlutils.getFirstReference();
        Reference reference = new ReferenceDDLUtils (referenceddlutils);

        Table foreignTable = TableUtils.getTable(database,foreignKeyddlutils.getForeignTableName());
        Column foreignCol = new ColumnDDLUtils(referenceddlutils.getForeignColumn(),foreignTable);
        foreignCol.setAlias(ReferenceUtils.getColumnAlias(foreignTable, foreignCol));
        reference.setForeignColumn(foreignCol);
        reference.setForeignColumnName(referenceddlutils.getForeignColumnName());
        reference.setForeignTable(foreignTable);
        reference.setForeignTableName(foreignKeyddlutils.getForeignTableName());
        Column localCol = new ColumnDDLUtils(referenceddlutils.getLocalColumn(), this);
        reference.setLocalColumn(localCol);
        Table localTable = new TableDDLUtils(table);
        reference.setLocalTable(localTable);
        localCol.setAlias(ReferenceUtils.getColumnAlias(localTable, localCol));
        if (reference.getForeignColumnName()==null) {
          System.out.println ("error in ref : no column on "+table.getName()+" - "+reference.getLocalColumnName());
          error = true;
View Full Code Here

Examples of net.sf.mpxj.Table

      TableFactory14 factory = new TableFactory14(TABLE_COLUMN_DATA_STANDARD, TABLE_COLUMN_DATA_ENTERPRISE, TABLE_COLUMN_DATA_BASELINE);
      int items = fixedData.getItemCount();
      for (int loop = 0; loop < items; loop++)
      {
         byte[] data = fixedData.getByteArrayValue(loop);
         Table table = factory.createTable(m_file, data, varMeta, varData);
         m_file.addTable(table);
         //System.out.println(table);
      }
   }
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.