本文整理汇总了Java中org.netbeans.jcode.stack.config.data.ApplicationConfigData类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationConfigData类的具体用法?Java ApplicationConfigData怎么用?Java ApplicationConfigData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationConfigData类属于org.netbeans.jcode.stack.config.data包,在下文中一共展示了ApplicationConfigData类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: inject
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
private void inject(Generator instance, ApplicationConfigData applicationConfigData, Map<Class<? extends LayerConfigData>, LayerConfigData> layerConfigData, ProgressHandler handler) {
List<Field> fields = getAllFields(new LinkedList<>(), instance.getClass());
for (Field field : fields) {
if (field.isAnnotationPresent(ConfigData.class)) {
field.setAccessible(true);
try {
if (field.getGenericType() == ApplicationConfigData.class) {
field.set(instance, applicationConfigData);
} else if (field.getGenericType() == EntityMappings.class) {
field.set(instance, applicationConfigData.getEntityMappings());
} else if (field.getType().isAssignableFrom(handler.getClass())) {
field.set(instance, handler);
} else if (LayerConfigData.class.isAssignableFrom(field.getType())) {
field.set(instance, layerConfigData.get(field.getType()));
}
} catch (IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
示例2: initialize
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
@Override
public void initialize(ApplicationConfigData applicationConfigData, ProgressHandler progressHandler) {
this.appConfigData = applicationConfigData;
this.handler = progressHandler;
// this.project = applicationConfigData.getTargetProject();
targetProject = appConfigData.getTargetProject();
targetSource = appConfigData.getTargetSourceGroup();
gatewayProject = appConfigData.getGatewayProject();
gatewaySource = appConfigData.getGatewaySourceGroup();
injectData();
}
示例3: logGenerateEvent
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
public static void logGenerateEvent(ApplicationConfigData applicationConfigData) {
logEvent(GENERATE_CATEGORY, DOMAIN, JPA);
logEvent(GENERATE_CATEGORY, DOMAIN, JPA_CLASS_COUNT, applicationConfigData.getEntityMappings().getJavaClass().size());
logSourceGenerationEvent(applicationConfigData.getBussinesTechContext(), applicationConfigData.isCompleteApplication());
logSourceGenerationEvent(applicationConfigData.getControllerTechContext(), applicationConfigData.isCompleteApplication());
logSourceGenerationEvent(applicationConfigData.getViewerTechContext(), applicationConfigData.isCompleteApplication());
}
示例4: GenerateCodeDialog
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
/**
* Creates new form GenerateCodeDialog
*
* @param modelerFile
*/
public GenerateCodeDialog(ModelerFile modelerFile) {
this.modelerFile = modelerFile;
this.scene = (JPAModelerScene) modelerFile.getModelerScene();
this.configData = new ApplicationConfigData();
this.modelerFileObject = modelerFile.getFileObject();
this.entityMappings = (EntityMappings) modelerFile.getDefinitionElement();
this.technologyPref = NbPreferences.forModule(Generator.class);
initUIComponents();
setArchState();
}
示例5: getConfigData
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
/**
* @return the configData
*/
public ApplicationConfigData getConfigData() {
configData.setCompleteApplication(isCompleteApplication());
configData.setProjectType(isMonolith() ? MONOLITH : (isMicroservice() ? MICROSERVICE : GATEWAY));
if (isMonolith()) {
configData.setTargetProject(targetProjectInfo.getProject());
configData.setTargetSourceGroup(targetProjectInfo.getSourceGroup());
configData.setTargetPackage(getTargetPackage());
configData.setGatewayProject(targetProjectInfo.getProject());
configData.setGatewaySourceGroup(targetProjectInfo.getSourceGroup());
configData.setGatewayPackage(getTargetPackage());
} else if (isMicroservice()) {
configData.setTargetProject(targetProjectInfo.getProject());
configData.setTargetSourceGroup(targetProjectInfo.getSourceGroup());
configData.setTargetPackage(getTargetPackage());
configData.setGatewayProject(gatewayProjectInfo.getProject());
configData.setGatewaySourceGroup(gatewayProjectInfo.getSourceGroup());
configData.setGatewayPackage(getGatewayPackage());
} else if (isGateway()) {
configData.setTargetProject(gatewayProjectInfo.getProject());
configData.setTargetSourceGroup(gatewayProjectInfo.getSourceGroup());
configData.setTargetPackage(getGatewayPackage());
configData.setGatewayProject(gatewayProjectInfo.getProject());
configData.setGatewaySourceGroup(gatewayProjectInfo.getSourceGroup());
configData.setGatewayPackage(getGatewayPackage());
}
configData.setTargetArtifactId(new POMManager(configData.getTargetProject(), true).getArtifactId());
configData.setGatewayArtifactId(new POMManager(configData.getGatewayProject(), true).getArtifactId());
return configData;
}
示例6: SourceCodeGeneratorTask
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
public SourceCodeGeneratorTask(ModelerFile modelerFile, ApplicationConfigData appConfigData, Runnable afterExecution) {
this.modelerFile = modelerFile;
this.appConfigData = appConfigData;
this.afterExecution=afterExecution;
if (BANNER_TXT == null) {
try (InputStream stream = getClass().getResourceAsStream("banner")) {
BANNER_TXT = Console.wrap(IOUtils.toString(stream), FG_MAGENTA);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
initialize();
}
示例7: initialize
import org.netbeans.jcode.stack.config.data.ApplicationConfigData; //导入依赖的package包/类
public abstract void initialize(ApplicationConfigData applicationConfigData, ProgressHandler progressHandler);