当前位置: 首页>>代码示例>>Java>>正文


Java Outline.getClasses方法代码示例

本文整理汇总了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;
}
 
开发者ID:svzdvd,项目名称:jaxb-lombok-plugin,代码行数:23,代码来源:LombokPlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:20,代码来源:AutoInheritancePlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:22,代码来源:MarshalMappings.java

示例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;
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:18,代码来源:ModifierPlugin.java

示例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;
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:23,代码来源:MetaPlugin.java

示例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");
  }
}
 
开发者ID:phax,项目名称:ph-ubl,代码行数:17,代码来源:PluginUBLValue.java

示例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;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:16,代码来源:ProcessorUtils.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:14,代码来源:DefaultOutlineProcessor.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:15,代码来源:EqualsPlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:30,代码来源:FixJAXB1058Plugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:9,代码来源:ToStringPlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:11,代码来源:AbstractCodeGeneratorPlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:10,代码来源:CopyablePlugin.java

示例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;
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:9,代码来源:SettersPlugin.java

示例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);
        }
    }
 
开发者ID:agodet,项目名称:wadlcodegenerator,代码行数:40,代码来源:ClassModelBuilder.java


注:本文中的com.sun.tools.xjc.outline.Outline.getClasses方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。