@Override protected void onEntry(EntryData entryData) throws IOException { p.load(entryData.openInputStream()); } };
/** * Scans all classes and registers only those annotated with {@link jodd.petite.meta.PetiteBean}. * Because of performance purposes, classes are not dynamically loaded; instead, their * file content is examined. */ @Override protected void onEntry(EntryData entryData) { String entryName = entryData.getName(); InputStream inputStream = entryData.openInputStream(); if (isTypeSignatureInUse(inputStream, petiteBeanAnnotationBytes) == false) { return; } Class<?> beanClass; try { beanClass = loadClass(entryName); } catch (ClassNotFoundException cnfex) { throw new PetiteException("Unable to load class: " + cnfex, cnfex); } PetiteBean petiteBean = beanClass.getAnnotation(PetiteBean.class); if (petiteBean == null) { return; } container.registerBean(beanClass); }
/** * Scans all classes and registers only those annotated with {@link jodd.petite.meta.PetiteBean}. * Because of performance purposes, classes are not dynamically loaded; instead, their * file content is examined. */ @Override protected void onEntry(EntryData entryData) { String entryName = entryData.getName(); InputStream inputStream = entryData.openInputStream(); if (isTypeSignatureInUse(inputStream, dbTableAnnotationBytes) == false) { return; } Class<?> beanClass; try { beanClass = loadClass(entryName); } catch (ClassNotFoundException cnfex) { throw new DbOomException("Unable to load class: " + entryName, cnfex); } DbTable dbTable = beanClass.getAnnotation(DbTable.class); if (dbTable == null) { return; } if (registerAsEntities == true) { dbOomManager.registerEntity(beanClass); } else { dbOomManager.registerType(beanClass); } }