Examples of lookupType()


Examples of com.strobel.assembler.metadata.MetadataSystem.lookupType()

            final TypeReference reference = parser.parseTypeDescriptor(internalName);

            type = metadataSystem.resolve(reference);
        }
        else {
            type = metadataSystem.lookupType(internalName);
        }

        final TypeDefinition resolvedType;

        if (type == null || (resolvedType = type.resolve()) == null) {
View Full Code Here

Examples of com.strobel.assembler.metadata.MetadataSystem.lookupType()

          //Duplicate
          if(history.add(etn)){
            out.putNextEntry(etn);
            try {
              String internalName = StringUtilities.removeRight(entry.getName(), ".class");
              TypeReference type = metadataSystem.lookupType(internalName);
              TypeDefinition resolvedType = null;
              if ((type == null) || ((resolvedType = type.resolve()) == null)) {
                throw new Exception("Unable to resolve type.");
              }
              Writer writer = new OutputStreamWriter(out);
View Full Code Here

Examples of com.strobel.assembler.metadata.MetadataSystem.lookupType()

  private void doSaveClassDecompiled(File inFile, File outFile) throws Exception {
    DecompilerSettings settings = cloneSettings();
    LuytenTypeLoader typeLoader = new LuytenTypeLoader();
    MetadataSystem metadataSystem = new MetadataSystem(typeLoader);
    TypeReference type = metadataSystem.lookupType(inFile.getCanonicalPath());

    DecompilationOptions decompilationOptions = new DecompilationOptions();
    decompilationOptions.setSettings(settings);
    decompilationOptions.setFullDecompilation(true);
View Full Code Here

Examples of jodd.db.oom.DbOomManager.lookupType()

   * Foreign key is created by concatenating foreign table name and column name.
   */
  public static DbSqlBuilder findForeign(Class entity, Object value) {
    String tableRef = createTableRefName(entity);
    DbOomManager dbOomManager = DbOomManager.getInstance();
    DbEntityDescriptor dedFk = dbOomManager.lookupType(value.getClass());

    String tableName = dbOomManager.getTableNames().convertTableNameToEntityName(dedFk.getTableName());
    String columnName = dbOomManager.getColumnNames().convertColumnNameToPropertyName(dedFk.getIdColumnName());

    String fkColumn = uncapitalize(tableName) + capitalize(columnName);
View Full Code Here

Examples of jodd.db.oom.DbOomManager.lookupType()

   * Otherwise, entity will be inserted into the database.
   */
  public <E> E store(E entity) {
    DbOomManager dboom = DbOomManager.getInstance();
    Class type = entity.getClass();
    DbEntityDescriptor ded = dboom.lookupType(type);

    if (ded == null) {
      throw new DbOomException("Not an entity: " + type);
    }
    if (isPersistent(ded, entity) == false) {
View Full Code Here

Examples of jodd.db.oom.DbOomManager.lookupType()

      if (result != 0) {
        // now reset the ID value
        DbOomManager dboom = DbOomManager.getInstance();
        Class type = entity.getClass();
        DbEntityDescriptor ded = dboom.lookupType(type);

        setEntityId(ded, entity, 0);
      }
    }
  }
View Full Code Here

Examples of jodd.db.oom.DbOomManager.lookupType()

  public synchronized long nextId(Class entityType) {
    MutableLong lastId = entityIdsMap.get(entityType);
    if (lastId == null) {
      DbOomManager dbOomManager = DbOomManager.getInstance();

      DbEntityDescriptor ded = dbOomManager.lookupType(entityType);
      String tableName = ded.getTableName();
      String idColumn = ded.getIdColumnName();

      DbOomQuery dbOomQuery = query("select max(" + idColumn + ") from " + tableName);
View Full Code Here

Examples of org.python.indexer.Scope.lookupType()

    public void testClassTypeBuiltinAttrs() throws Exception {
        String file = "classtype_builtins.py";
        buildIndex(file);
        NModuleType module = (NModuleType)idx.moduleTable.lookupType(abspath(file));
        Scope mtable = module.getTable();
        assertTrue(mtable.lookupType("MyClass").isClassType());
        assertTrue(mtable.lookupType("MyClassNoDoc").isClassType());
        assertTrue(mtable.lookupType("MyClass").getTable().getParent() == mtable);
        assertEquals(NBinding.Kind.CLASS, mtable.lookup("MyClass").getKind());
        Scope t = mtable.lookupType("MyClass").getTable();
        assertTrue(t.lookupType("__bases__").isTupleType());
View Full Code Here

Examples of org.python.indexer.Scope.lookupType()

        String file = "classtype_builtins.py";
        buildIndex(file);
        NModuleType module = (NModuleType)idx.moduleTable.lookupType(abspath(file));
        Scope mtable = module.getTable();
        assertTrue(mtable.lookupType("MyClass").isClassType());
        assertTrue(mtable.lookupType("MyClassNoDoc").isClassType());
        assertTrue(mtable.lookupType("MyClass").getTable().getParent() == mtable);
        assertEquals(NBinding.Kind.CLASS, mtable.lookup("MyClass").getKind());
        Scope t = mtable.lookupType("MyClass").getTable();
        assertTrue(t.lookupType("__bases__").isTupleType());
        assertTrue(t.lookupType("__dict__").isDictType());
View Full Code Here

Examples of org.python.indexer.Scope.lookupType()

        buildIndex(file);
        NModuleType module = (NModuleType)idx.moduleTable.lookupType(abspath(file));
        Scope mtable = module.getTable();
        assertTrue(mtable.lookupType("MyClass").isClassType());
        assertTrue(mtable.lookupType("MyClassNoDoc").isClassType());
        assertTrue(mtable.lookupType("MyClass").getTable().getParent() == mtable);
        assertEquals(NBinding.Kind.CLASS, mtable.lookup("MyClass").getKind());
        Scope t = mtable.lookupType("MyClass").getTable();
        assertTrue(t.lookupType("__bases__").isTupleType());
        assertTrue(t.lookupType("__dict__").isDictType());
        assertEquals(idx.builtins.BaseStr, t.lookupType("__name__"));
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.