org.moe.gradle.options.UIActionsAndOutletsOptions Maven / Gradle / Ivy
/*
Copyright (C) 2017 Migeran
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.moe.gradle.options;
import org.moe.gradle.anns.IgnoreUnused;
import org.moe.gradle.anns.NotNull;
import org.moe.gradle.utils.Require;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class UIActionsAndOutletsOptions {
/**
* List of regex strings for which classes to include in the generation.
*/
@NotNull private List includes = new ArrayList<>();
@NotNull
public List getIncludes() {
return Require.nonNull(includes);
}
@IgnoreUnused
public void setIncludes(@NotNull Collection list) {
this.includes = new ArrayList<>(Require.nonNull(list));
}
public void include(@NotNull String regex) {
includes.add(Require.nonNull(regex));
}
/**
* List of strings to append to the generated code.
*/
@NotNull private List additionalCodes = new ArrayList<>();
@NotNull
public List getAdditionalCodes() {
return Require.nonNull(additionalCodes);
}
@IgnoreUnused
public void setAdditionalCodes(@NotNull Collection list) {
this.additionalCodes = new ArrayList<>(Require.nonNull(list));
}
public void additionalCode(@NotNull String regex) {
additionalCodes.add(Require.nonNull(regex));
}
/**
* List of '@import'-s to exclude from generation.
*/
@NotNull private List excludeLibraries = new ArrayList<>();
@NotNull
public List getExcludeLibraries() {
return Require.nonNull(excludeLibraries);
}
@IgnoreUnused
public void setExcludeLibraries(@NotNull Collection list) {
this.excludeLibraries = new ArrayList<>(Require.nonNull(list));
}
public void excludeLibrary(@NotNull String regex) {
excludeLibraries.add(Require.nonNull(regex));
}
}