com.sun.tools.xjc.model.CClassInfoParent Java Examples

The following examples show how to use com.sun.tools.xjc.model.CClassInfoParent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XJCCMInfoFactory.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 6 votes vote down vote up
private MContainer getContainer(CClassInfoParent parent) {
	return parent.accept(new Visitor<MContainer>() {

		public MContainer onBean(CClassInfo bean) {
			return getTypeInfo(bean);
		}

		public MContainer onPackage(JPackage pkg) {
			return getPackage(pkg);
		}

		public MContainer onElement(CElementInfo element) {
			return getElementInfo(element);
		}
	});
}
 
Example #2
Source File: XJCCMInfoFactory.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 6 votes vote down vote up
private MPackageInfo getPackage(CClassInfoParent parent) {

		return parent.accept(new Visitor<MPackageInfo>() {

			public MPackageInfo onBean(CClassInfo bean) {
				return getPackage(bean.parent());
			}

			public MPackageInfo onPackage(JPackage pkg) {
				return getPackage(pkg);
			}

			public MPackageInfo onElement(CElementInfo element) {
				return getPackage(element.parent);
			}
		});

	}
 
Example #3
Source File: DefaultIgnoring.java    From hyperjaxb3 with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private CClassInfoParent.Package getPackageInfo(CClassInfoParent parent) {
	if (parent instanceof CClassInfoParent.Package) {
		return (Package) parent;
	} else if (parent instanceof CClassInfo) {
		return getPackageInfo(((CClassInfo) parent).parent());
	} else if (parent instanceof CElementInfo) {
		return getPackageInfo(((CElementInfo) parent).parent);
	} else {
		throw new AssertionError("Unexpexted class info parent [" + parent
				+ "].");
	}

}
 
Example #4
Source File: XJCCMInfoFactory.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected MContainer getContainer(CClassInfo info) {
	final CClassInfoParent parent = info.parent();
	return parent == null ? null : getContainer(parent);
}
 
Example #5
Source File: XJCCMInfoFactory.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected MContainer getContainer(CElementInfo info) {
	final CClassInfoParent parent = info.parent;
	return parent == null ? null : getContainer(parent);
}
 
Example #6
Source File: XJCCMInfoFactory.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected MContainer getContainer(CEnumLeafInfo info) {
	final CClassInfoParent parent = info.parent;
	return parent == null ? null : getContainer(parent);
}
 
Example #7
Source File: Ignoring.java    From hyperjaxb3 with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public boolean isPackageInfoIgnored(ProcessModel context, Model model,
CClassInfoParent.Package packageInfo);