本文整理汇总了Java中com.sun.tools.xjc.outline.Outline.getClasses方法的典型用法代码示例。如果您正苦于以下问题:Java Outline.getClasses方法的具体用法?Java Outline.getClasses怎么用?Java Outline.getClasses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.xjc.outline.Outline
的用法示例。
在下文中一共展示了Outline.getClasses方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options options, ErrorHandler errorHandler) {
// for each generated classes
for (ClassOutline generatedClassOutline : outline.getClasses()) {
JDefinedClass generatedClass = generatedClassOutline.implClass;
if (!isAbstractClass(generatedClass) &&
!generatedClass.fields().isEmpty()) {
boolean commandExecuted = false;
for (Command command : commands.values()) {
if (command.isEnabled()) {
command.editGeneratedClass(generatedClass);
commandExecuted = true;
}
}
if (!commandExecuted) {
defaultCommand.editGeneratedClass(generatedClass);
}
}
}
return true;
}
示例2: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
for (final ClassOutline classOutline : outline.getClasses()) {
if (classOutline.target.getElementName() != null) {
processGlobalElement(classOutline);
} else {
processGlobalComplexType(classOutline);
}
}
for (final CElementInfo elementInfo : outline.getModel()
.getAllElements()) {
final ElementOutline elementOutline = outline
.getElement(elementInfo);
if (elementOutline != null) {
processGlobalJAXBElement(elementOutline);
}
}
return true;
}
示例3: process
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
public Collection<ClassOutline> process(EjbPlugin context, Outline outline,
Options options) throws Exception {
logger.debug("Processing outline with context path ["
+ OutlineUtils.getContextPath(outline) + "].");
final Collection<? extends ClassOutline> classes = outline.getClasses();
final Collection<ClassOutline> processedClassOutlines = new ArrayList<ClassOutline>(
classes.size());
for (final ClassOutline classOutline : classes) {
if (!getIgnoring()
.isClassOutlineIgnored(getMapping(), classOutline)) {
final ClassOutline processedClassOutline = process(this,
classOutline, options);
if (processedClassOutline != null) {
processedClassOutlines.add(processedClassOutline);
}
}
}
return processedClassOutlines;
}
示例4: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(final Outline outline, final Options opt, final ErrorHandler errorHandler) throws SAXException {
final PluginContext pluginContext = PluginContext.get(outline, opt, errorHandler);
for (final ClassOutline classOutline : outline.getClasses()) {
try {
final GroupInterfacePlugin groupInterfacePlugin = pluginContext.findPlugin(GroupInterfacePlugin.class);
if (groupInterfacePlugin != null) {
ModifierGenerator.generateClass(pluginContext, new DefinedClassOutline(pluginContext, classOutline), this.modifierClassName, this.modifierClassName, groupInterfacePlugin.getGroupInterfacesForClass(pluginContext, classOutline.implClass.fullName()), this.modifierMethodName);
} else {
ModifierGenerator.generateClass(pluginContext, new DefinedClassOutline(pluginContext, classOutline), this.modifierClassName, this.modifierMethodName);
}
} catch (final JClassAlreadyExistsException e) {
errorHandler.error(new SAXParseException(e.getMessage(), classOutline.target.getLocator()));
}
}
return true;
}
示例5: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(final Outline outline, final Options opt, final ErrorHandler errorHandler) throws SAXException {
final PluginContext pluginContext = PluginContext.get(outline, opt, errorHandler);
if (this.extended && this.generateTools) {
pluginContext.writeSourceFile(PropertyInfo.class);
pluginContext.writeSourceFile(SinglePropertyInfo.class);
pluginContext.writeSourceFile(CollectionPropertyInfo.class);
pluginContext.writeSourceFile(IndirectCollectionPropertyInfo.class);
pluginContext.writeSourceFile(IndirectPrimitiveCollectionPropertyInfo.class);
pluginContext.writeSourceFile(PropertyVisitor.class);
pluginContext.writeSourceFile(Property.class);
pluginContext.writeSourceFile(SingleProperty.class);
pluginContext.writeSourceFile(CollectionProperty.class);
pluginContext.writeSourceFile(IndirectCollectionProperty.class);
pluginContext.writeSourceFile(IndirectPrimitiveCollectionProperty.class);
pluginContext.writeSourceFile(ItemProperty.class);
}
for (final ClassOutline classOutline : outline.getClasses()) {
generateMetaClass(pluginContext, classOutline, errorHandler);
}
return true;
}
示例6: _addDefaultCtors
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
private void _addDefaultCtors (@Nonnull final Outline aOutline)
{
for (final ClassOutline aClassOutline : aOutline.getClasses ())
{
final JDefinedClass jClass = aClassOutline.implClass;
// Always add default constructor
final JMethod aDefCtor = jClass.constructor (JMod.PUBLIC);
aDefCtor.javadoc ().add ("Default constructor");
aDefCtor.javadoc ().add (AUTHOR);
// General information
jClass.javadoc ()
.add ("<p>This class contains methods created by " + CUBLJAXB.PLUGIN_NAME + " -" + OPT + "</p>\n");
}
}
示例7: findClassOutline
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
public static ClassOutline findClassOutline(JDefinedClass definedClass, Outline outline) {
if (definedClass == null) {
return null;
}
ClassOutline classOutline = null;
for (ClassOutline clazz : outline.getClasses()) {
if (definedClass.equals(clazz.implClass)) {
classOutline = clazz;
break;
}
}
return classOutline;
}
示例8: process
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
public Map<ClassOutline, T> process(C context, Outline outline,
Options options) throws Exception {
final Map<ClassOutline, T> classMappingsMap = new HashMap<ClassOutline, T>();
for (final ClassOutline classOutline : outline.getClasses()) {
final T result = getClassOutlineProcessor().process(context,
classOutline, options);
if (result != null) {
classMappingsMap.put(classOutline, result);
}
}
return classMappingsMap;
}
示例9: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
for (final ClassOutline classOutline : outline.getClasses()) {
if (!getIgnoring().isIgnored(classOutline)) {
processClassOutline(classOutline);
}
}
// for (final EnumOutline enumOutline : outline.getEnums()) {
// if (!getIgnoring().isIgnored(enumOutline)) {
// processEnumOutline(enumOutline);
// }
// }
return true;
}
示例10: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler)
throws SAXException {
try {
DummyListField_$get = new FieldAccessor<JMethod>(
DummyListField.class, "$get", JMethod.class);
IsSetField_core = new FieldAccessor<FieldOutline>(IsSetField.class,
"core", FieldOutline.class);
AbstractListField_field = new FieldAccessor<JFieldVar>(
DummyListField.class.getSuperclass(), "field",
JFieldVar.class);
AbstractListField_listT = new FieldAccessor<JClass>(
DummyListField.class.getSuperclass(), "listT", JClass.class);
DummyListField_coreList = new FieldAccessor<JClass>(
DummyListField.class, "coreList",
JClass.class);
} catch (Exception ex) {
throw new SAXException("Could not create field accessors. "
+ "This plugin can not be used in this environment.", ex);
}
for (ClassOutline classOutline : outline.getClasses()) {
for (FieldOutline fieldOutline : classOutline.getDeclaredFields()) {
fixFieldOutline(fieldOutline);
}
}
return false;
}
示例11: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
for (final ClassOutline classOutline : outline.getClasses())
if (!getIgnoring().isIgnored(classOutline)) {
processClassOutline(classOutline);
}
return true;
}
示例12: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
this.codeGenerator = createCodeGenerator(outline.getCodeModel());
for (final ClassOutline classOutline : outline.getClasses()) {
if (!getIgnoring().isIgnored(classOutline)) {
processClassOutline(classOutline);
}
}
return true;
}
示例13: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
@Override
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
for (final ClassOutline classOutline : outline.getClasses())
if (!getIgnoring().isIgnored(classOutline)) {
processClassOutline(classOutline);
}
return true;
}
示例14: run
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) {
for (final ClassOutline classOutline : outline.getClasses())
if (!getIgnoring().isIgnored(classOutline)) {
processClassOutline(classOutline);
}
return true;
}
示例15: buildClassModel
import com.sun.tools.xjc.outline.Outline; //导入方法依赖的package包/类
public static void buildClassModel(Outline outline, CGModel cgModel, CGConfig cgConfig) {
// build class full name to element qname mapping
Map<String, QName> mapping = buildClass2ElementMapping(outline);
String[] persistentFileArray = {};
try
{ persistentFileArray = ClassModelBuilder.generatePersistentData(cgConfig); }
catch(Exception e) { e.printStackTrace(); }
for (ClassOutline co : outline.getClasses()) {
ClassInfo classInfo = new ClassInfo();
String packageName = ClassNameUtil.getPackageName(co.implClass.fullName());
// for anonymous inner class, we need to change package name to lower case
classInfo.setNestClass(isNestClass(co.implClass));
classInfo.setPackageName(packageName);
classInfo.setName(co.implClass.name());
classInfo.setFullName((!StringUtil.isEmpty(classInfo.getPackageName()) ? packageName + "." : "") + classInfo.getName());
classInfo.setXmlTypeAnnotation(getXmlTypeAnnotation(co)); // @XmlType(name="foo", targetNamespace="bar://baz")
classInfo.setAbstract(co.implClass.isAbstract());
setSuperClass(co, classInfo);
classInfo.setRootElementAnnotation(getRootElementAnnotation(co, mapping, classInfo));
classInfo.setDocComment(ModelBuilder.getDocumentation(co.target.getSchemaComponent()));
if (Arrays.asList(persistentFileArray).contains(classInfo.getName())){
classInfo.setPersistentClass(true);
}
addFields(cgConfig, co, classInfo);
addSuperClassesFields(cgConfig, co, classInfo);
// add this class in the code generation model
cgModel.getClasses().add(classInfo);
}
}