org.glassfish.jaxb.runtime.v2.model.impl.RuntimeTypeInfoSetImpl Maven / Gradle / Ivy
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.glassfish.jaxb.runtime.v2.model.impl;
import com.sun.xml.bind.v2.model.annotation.AnnotationReader;
import com.sun.xml.bind.v2.model.core.TypeInfoSet;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeNonElement;
import org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeTypeInfoSet;
import javax.xml.namespace.QName;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Map;
/**
* {@link TypeInfoSet} specialized for runtime.
*
* @author Kohsuke Kawaguchi
*/
final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl implements RuntimeTypeInfoSet {
public RuntimeTypeInfoSetImpl(AnnotationReader reader) {
super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
}
@Override
protected RuntimeNonElement createAnyType() {
return RuntimeAnyTypeImpl.theInstance;
}
public RuntimeNonElement getTypeInfo( Type type ) {
return (RuntimeNonElement)super.getTypeInfo(type);
}
public RuntimeNonElement getAnyTypeInfo() {
return (RuntimeNonElement)super.getAnyTypeInfo();
}
public RuntimeNonElement getClassInfo(Class clazz) {
return (RuntimeNonElement)super.getClassInfo(clazz);
}
public Map beans() {
return (Map)super.beans();
}
public Map> builtins() {
return (Map>)super.builtins();
}
public Map> enums() {
return (Map>)super.enums();
}
public Map arrays() {
return (Map)super.arrays();
}
public RuntimeElementInfoImpl getElementInfo(Class scope,QName name) {
return (RuntimeElementInfoImpl)super.getElementInfo(scope,name);
}
public Map getElementMappings(Class scope) {
return (Map)super.getElementMappings(scope);
}
public Iterable getAllElements() {
return (Iterable)super.getAllElements();
}
}