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


Java ClassOutline.getSuperClass方法代码示例

本文整理汇总了Java中com.sun.tools.xjc.outline.ClassOutline.getSuperClass方法的典型用法代码示例。如果您正苦于以下问题:Java ClassOutline.getSuperClass方法的具体用法?Java ClassOutline.getSuperClass怎么用?Java ClassOutline.getSuperClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.tools.xjc.outline.ClassOutline的用法示例。


在下文中一共展示了ClassOutline.getSuperClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIdFieldsOutline

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private Collection<FieldOutline> getIdFieldsOutline(
		final ClassOutline classOutline) {
	final Collection<FieldOutline> idFieldOutlines = new ArrayList<FieldOutline>();
	ClassOutline current = classOutline;

	while (current != null) {
		for (FieldOutline idFieldOutline : current.getDeclaredFields()) {
			final CPropertyInfo propertyInfo = idFieldOutline
					.getPropertyInfo();
			if ((CustomizationUtils.containsCustomization(propertyInfo,
					Customizations.ID_ELEMENT_NAME) || CustomizationUtils
					.containsCustomization(propertyInfo,
							Customizations.EMBEDDED_ID_ELEMENT_NAME))
					&& !CustomizationUtils.containsCustomization(
							propertyInfo,
							Customizations.IGNORED_ELEMENT_NAME)) {
				idFieldOutlines.add(idFieldOutline);
			}
		}
		current = current.getSuperClass();
	}

	return idFieldOutlines;
}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:25,代码来源:EmbeddedAssociationMappingWrapper.java

示例2: isClassOutlineIgnored

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public boolean isClassOutlineIgnored(Mapping context,
		ClassOutline classOutline) {
	if (isPackageOutlineIgnored(context, classOutline.parent(),
			classOutline._package())) {
		logger.debug("Class outline is ignored since package is ignored.");
		markAsAcknowledged(classOutline);
		return true;
	} else if (CustomizationUtils.containsCustomization(classOutline,
			Customizations.IGNORED_ELEMENT_NAME)) {
		logger.debug("Class outline is ignored per customization.");
		markAsAcknowledged(classOutline);
		return true;
	} else if (classOutline.getSuperClass() != null
			&& isClassOutlineIgnored(context, classOutline.getSuperClass())) {
		logger.debug("Class outline is ignored since superclass outline is ignored.");
		markAsAcknowledged(classOutline);
		return true;
	} else {
		return false;
	}
}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:22,代码来源:DefaultIgnoring.java

示例3: hasParentAnnotation

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public static boolean hasParentAnnotation(ClassOutline classOutline, QName annotation) {
    if (classOutline.getSuperClass() == null) {
        return hasAnnotation(classOutline, annotation);
    }

    return hasAnnotation(classOutline, annotation) || hasParentAnnotation(classOutline.getSuperClass(), annotation);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:ProcessorUtils.java

示例4: hasParentAnnotation

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private boolean hasParentAnnotation(ClassOutline classOutline, QName annotation) {
    if (classOutline.getSuperClass() == null) {
        return hasAnnotation(classOutline, annotation);
    }

    return hasAnnotation(classOutline, annotation) || hasParentAnnotation(classOutline.getSuperClass(), annotation);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:SchemaProcessor.java

示例5: createFluentFieldMethods

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private void createFluentFieldMethods(ClassOutline targetClass, ClassOutline sourceClass) {
	Map<String, JFieldVar> fields = sourceClass.implClass.fields();
	for (String field : fields.keySet()) {
		JFieldVar fieldVar = fields.get(field);
		if (!isAuxiliaryField(fieldVar) && !hasAnnotationClass(fieldVar, XmlAnyElement.class)) {
			createFluentFieldMethods(fieldVar, targetClass, sourceClass);
		}
	}
	if (sourceClass.getSuperClass() != null) {
		createFluentFieldMethods(targetClass, sourceClass.getSuperClass());
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:13,代码来源:SchemaProcessor.java

示例6: getMethod

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public static JMethod getMethod(final ClassOutline classOutline,
		final String name) {
	final JDefinedClass ref = classOutline.ref;
	final JMethod method = getMethod(ref, name);
	if (method != null) {
		return method;
	} else {
		final ClassOutline superClassOutline = classOutline.getSuperClass();
		if (superClassOutline == null) {
			return null;
		} else {
			return getMethod(superClassOutline, name);
		}
	}
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:16,代码来源:CodeModelUtils.java

示例7: addAncestors

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private static void addAncestors(ClassOutline classOutline,
		List<ClassOutline> classOutlines) {
	if (classOutline.getSuperClass() != null) {
		final ClassOutline superClassOutline = classOutline.getSuperClass();
		addAncestors(superClassOutline, classOutlines);
	}
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:8,代码来源:ClassUtils.java

示例8: getFields

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public static FieldOutline[] getFields(ClassOutline classOutline) {
	final List<FieldOutline> fields = new ArrayList<FieldOutline>();
	fields.addAll(Arrays.asList(classOutline.getDeclaredFields()));
	if (classOutline.getSuperClass() != null) {
		fields.addAll(Arrays
				.asList(getFields(classOutline.getSuperClass())));
	}
	return fields.toArray(new FieldOutline[fields.size()]);
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:10,代码来源:ClassUtils.java

示例9: findInheritedFieldWithCustomization

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public static FieldOutline findInheritedFieldWithCustomization(ClassOutline classOutline, final QName name) {
	for (final FieldOutline fieldOutline : classOutline.getDeclaredFields()) {
		if (containsCustomization(fieldOutline, name)) {
			return fieldOutline;
		}
	}
	final ClassOutline superClassOutline = classOutline.getSuperClass();
	if (superClassOutline != null) {
		return findInheritedFieldWithCustomization(superClassOutline, name);
	} else {
		return null;
	}
}
 
开发者ID:highsource,项目名称:jaxb2-basics,代码行数:14,代码来源:CustomizationUtils.java

示例10: isRootClass

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public boolean isRootClass(Mapping context, ClassOutline classOutline) {
	if (classOutline.getSuperClass() != null) {
		return !CustomizationUtils.containsCustomization(classOutline,
				Customizations.MAPPED_SUPERCLASS_ELEMENT_NAME)
				&& !isSelfOrAncestorRootClass(context,
						classOutline.getSuperClass());
	} else {
		return !CustomizationUtils.containsCustomization(classOutline,
				Customizations.MAPPED_SUPERCLASS_ELEMENT_NAME);
	}
}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:12,代码来源:EntityMapping.java

示例11: isSelfOrAncestorRootClass

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
public boolean isSelfOrAncestorRootClass(Mapping context,
		ClassOutline classOutline) {
	if (context.getIgnoring().isClassOutlineIgnored(context, classOutline)) {
		return false;
	} else if (isRootClass(context, classOutline)) {
		return true;
	} else if (classOutline.getSuperClass() != null) {
		return isSelfOrAncestorRootClass(context,
				classOutline.getSuperClass());
	} else {
		return !CustomizationUtils.containsCustomization(classOutline,
				Customizations.MAPPED_SUPERCLASS_ELEMENT_NAME);
	}

}
 
开发者ID:highsource,项目名称:hyperjaxb3,代码行数:16,代码来源:EntityMapping.java

示例12: createSupportProperty

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private void createSupportProperty(final Outline outline,
									final ClassOutline classOutline,
									final Class<?> supportClass,
									final Class<?> listenerClass,
									final String aspectName) {
	final JCodeModel m = outline.getCodeModel();
	final JDefinedClass definedClass = classOutline.implClass;

	final String aspectNameCap = aspectName.substring(0, 1).toUpperCase() + aspectName.substring(1);

	if (classOutline.getSuperClass() == null) { // only generate fields in topmost classes
		final JFieldVar supportField = definedClass.field(JMod.PROTECTED | JMod.FINAL | JMod.TRANSIENT, supportClass, aspectName + BoundPropertiesPlugin.SUPPORT_FIELD_SUFFIX, JExpr._new(m.ref(supportClass)).arg(JExpr._this()));
		final JMethod addMethod = definedClass.method(JMod.PUBLIC, m.VOID, "add" + aspectNameCap + "Listener");
		final JVar addParam = addMethod.param(JMod.FINAL, listenerClass, aspectName + "Listener");
		addMethod.body().invoke(JExpr._this().ref(supportField), "add" + aspectNameCap + "Listener").arg(addParam);

		final JMethod removeMethod = definedClass.method(JMod.PUBLIC, m.VOID, "remove" + aspectNameCap + "Listener");
		final JVar removeParam = removeMethod.param(JMod.FINAL, listenerClass, aspectName + "Listener");
		removeMethod.body().invoke(JExpr._this().ref(supportField), "remove" + aspectNameCap + "Listener").arg(removeParam);
	}
	final JMethod withMethod = definedClass.method(JMod.PUBLIC, definedClass, "with" + aspectNameCap + "Listener");
	final JVar withParam = withMethod.param(JMod.FINAL, listenerClass, aspectName + "Listener");
	withMethod.body().invoke("add" + aspectNameCap + "Listener").arg(withParam);
	withMethod.body()._return(JExpr._this());

	if (classOutline.getSuperClass() != null) {
		withMethod.annotate(Override.class);
	}
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:30,代码来源:BoundPropertiesPlugin.java

示例13: generateVisitMethod

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private JMethod generateVisitMethod(final ClassOutline classOutline) {
	final JDefinedClass definedClass = classOutline.implClass;
	final JMethod visitMethod = definedClass.method(JMod.PUBLIC, definedClass, this.visitMethodName);
	final JCodeModel codeModel = definedClass.owner();
	final JClass visitorType = codeModel.ref(PropertyVisitor.class);
	final JVar visitorParam = visitMethod.param(JMod.FINAL, visitorType, "_visitor_");
	if (classOutline.getSuperClass() != null) {
		visitMethod.body().add(JExpr._super().invoke(this.visitMethodName).arg(visitorParam));
	} else {
		visitMethod.body().add(visitorParam.invoke("visit").arg(JExpr._this()));
	}
	return visitMethod;
}
 
开发者ID:mklemm,项目名称:jaxb2-rich-contract-plugin,代码行数:14,代码来源:MetaPlugin.java

示例14: addSuperClassesFields

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private static void addSuperClassesFields(CGConfig cgConfig, ClassOutline co, ClassInfo classInfo) {
    ClassOutline superClass = co.getSuperClass();
    while (superClass != null && !"Object".equals(superClass.implClass.name())) {
        classInfo.getSuperClassesFields().addAll(getFields(cgConfig, superClass));
        superClass = superClass.getSuperClass();
    }
}
 
开发者ID:agodet,项目名称:wadlcodegenerator,代码行数:8,代码来源:ClassModelBuilder.java

示例15: setSuperClass

import com.sun.tools.xjc.outline.ClassOutline; //导入方法依赖的package包/类
private static void setSuperClass(ClassOutline co, ClassInfo classInfo) {
    // has super class?
    ClassOutline sco = co.getSuperClass();
    if (sco != null) {
        ClassInfo superClass = new ClassInfo();
        superClass.setName(sco.implClass.name());
        superClass.setFullName(sco.implClass.fullName());
        classInfo.setSuperClass(superClass);
    }
}
 
开发者ID:agodet,项目名称:wadlcodegenerator,代码行数:11,代码来源:ClassModelBuilder.java


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