@SuppressWarnings("rawtypes") @Override public List getTableNames(Connection connection) throws SQLException { return Arrays.asList(TABLES_NAMES); }
public MigrateToV2(String[] recipe) { this(Arrays.asList(recipe)); }
/** * @return a list of all files with ".substvar" extension in "META-INF" folder of the project. */ protected List<File> getAllSubstVarFiles() { FileFilter substVarFilter = new FileFilter() { @Override public boolean accept(File file) { return file.getName().toLowerCase().endsWith(".substvar"); } }; File[] substVarFiles = metaInfSource.listFiles(substVarFilter); List<File> result = new ArrayList<File>(); List<?> substVarFilesList = Arrays.asList(substVarFiles); for (Object substVarFileObject : substVarFilesList) { File substVarFile = (File) substVarFileObject; result.add(substVarFile); } return result; }
/** * Return a list of all the {@link AccountAttribute account attributes}. * * @return the account attributes */ @SuppressWarnings("unchecked") public static List<AccountAttribute> all() { return Arrays.asList(AccountAttribute.values()); }
public boolean addAll(Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a collection of type " + type.getName()); } return coll.addAll(Arrays.asList(checked)); }
public boolean addAll(Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a collection of type " + type.getName()); } return coll.addAll(Arrays.asList(checked)); }
@Override public void execute() { execute(Arrays.asList(new String[]{"mvn", "-X", "-f", projectDir + "/pom.xml", "compile", "exec:exec", "-Dexec.executable=java", "-DmainClass=org.minnal.generator.test.TestsGenerator", "-Dexec.args=-cp %classpath org.minnal.generator.test.TestsGenerator " + projectDir + " " + baseTestClass + " " + Joiner.on(",").join(packages)})); }
public boolean addAll(int index, Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a list of type " + type.getName()); } return list.addAll(index, Arrays.asList(checked)); }
public boolean addAll(int index, Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a list of type " + type.getName()); } return list.addAll(index, Arrays.asList(checked)); }
public boolean addAll(Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a collection of type " + type.getName()); } return coll.addAll(Arrays.asList(checked)); }
public boolean addAll(int index, Collection c) { Object[] checked; try { checked = c.toArray(getEmptyArr()); } catch (ArrayStoreException e) { throw new ClassCastException( "Attempted to insert an element of invalid type " + " to a list of type " + type.getName()); } return list.addAll(index, Arrays.asList(checked)); }
@Override public void initialise(){ //this will call #importResource(..) for all files in the directories //configured by the #PARAM_SOURCE_FILE_OR_FOLDER loader.loadResources(); //create the lists vcardFiles = Arrays.asList(vcardFileImportFolder.listFiles( (FilenameFilter)VCardFileFilter.INSTANCE)); }
public EmptySectionsFieldfilter(CoreSession session) { this.session = session; this.lcFilter = new LifeCycleFilter((List<String>) Arrays.asList(ACCEPTED_LIFE_CYCLE_STATES), null); }
private void deleteFile(File file, String[] save) { List<String> list = Arrays.asList(save); list = new ArrayList<>(list); list.add(".git"); String name = ""; try { name = file.getCanonicalPath(); } catch (IOException e) { log.error(e.getMessage(), e); } for (String blocker : list) { if (name.contains(blocker)) { return; } } file.delete(); }
@Override public void execute() { if (values.size() > 0) { projectDir = values.get(0); } execute(Arrays.asList(new String[]{"mvn", "-X", "-f", projectDir + "/pom.xml", "compile", "exec:exec", "-DmainClass=org.minnal.Bootstrap"})); } }
public static Metrics sum(Metrics... metrics) { return sum(Arrays.asList(metrics)); }
@Override public void executeTask() throws MojoExecutionException, MojoFailureException { if (Project.hasProject(new File(System.getProperty("user.dir")))) { feature = wizard.promptForMissingValueWithOptions("What feature would you like to add?", feature, "feature", Arrays.asList(OPTIONS), null, null); if(feature.equals(OPEN_WEB_APP) || feature.equals("owa")){ addOwaSubmodule(); } else { throw new IllegalArgumentException("Adding feature "+feature+" is not available. Available features: "+OPTIONS); } } else { throw new IllegalArgumentException("No project found in this directory. Please enter project's main directory and run this command again"); } }
public List<Constant> domain(Context mo) { Collection<?> col = (Collection<?>) backend.eval(mo); if ("<:".equals(op) || "/<:".equals(op)) { List<Object> s = new ArrayList<>(col); List<List<Object>> tuples = s.stream().map(o -> s).collect(Collectors.toList()); AllTuplesGenerator<Object> tg = new AllTuplesGenerator<>(Object.class, tuples); Set<Constant> res = new HashSet<>(); while (tg.hasNext()) { Object[] tuple = tg.next(); res.add(new Constant(new HashSet<>(Arrays.asList(tuple)), backend.type())); } return new ArrayList<>(res); } List<Constant> s = new ArrayList<>(); for (Object o : col) { s.add(new Constant(o, type())); } return s; }
@SuppressWarnings("unchecked") protected Cfg(ScalaGenJsonMojo data) throws Exception { groupId = data.project.getGroupId(); artifactId = data.artifactId; version = data.project.getVersion(); logo = data.logo; license = data.license; description = data.description; tags = data.tags; linksources = data.linksources; if (StringUtils.isBlank(license) && !data.project.getLicenses().isEmpty()) { License lic = (License) data.project.getLicenses().get(0); license = String.format("<a href='%s'>%s</a>", lic.getUrl(), lic.getName()); } dependencies = makeDependencies(data); sources = makeSources(data); artifacts = makeArtifacts(data); if (data.args != null && data.args.length > 0) { additionnalArgs = Arrays.asList(data.args); } kind = makeKind(data); }
@Test public void testMainPackages() throws ClassNotFoundException { final Set<String> basePackages = new HashSet<String>(1); basePackages.add(CrossTable.class.getPackage().getName()); final Set<PackageVO> packages = EntityFinder.findAllEntities(basePackages); assertThat(packages).isNotNull().isNotEmpty().hasSize(3); // FEST assert contains() method doesn't realy work very well assertThat(packages.containsAll(Arrays.asList(new PackageVO[] { new PackageVO(RefA.class.getPackage().getName()), new PackageVO(CrossTable.class.getPackage().getName()), new PackageVO(ImplementingTableA1.class.getPackage().getName()) }))).isEqualTo(true); final Iterator<PackageVO> it = packages.iterator(); PackageVO p = it.next(); assertThat(p.getName()).isNotNull().isNotEmpty().isEqualTo(TableA.class.getPackage().getName()); assertThat(p.getEntities()).isNotNull().isNotEmpty().hasSize(TestInfo.numberOfEntities - TestInfo.numberOfEntitiesInGenericPackage - TestInfo.numberOfEntitiesInSubPackage); p = it.next(); assertThat(p.getName()).isNotNull().isNotEmpty().isEqualTo(AbstractTableA.class.getPackage().getName()); assertThat(p.getEntities()).isNotNull().isNotEmpty().hasSize(TestInfo.numberOfEntitiesInGenericPackage); p = it.next(); assertThat(p.getName()).isNotNull().isNotEmpty().isEqualTo(RefA.class.getPackage().getName()); assertThat(p.getEntities()).isNotNull().isNotEmpty().hasSize(TestInfo.numberOfEntitiesInSubPackage); }