All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.l0km.codegen.base.ServiceInfo Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
package com.gitee.l0km.codegen.base;

import java.util.Map;

import com.gitee.l0km.codegen.annotations.Service;

public class ServiceInfo implements WebServiceClassConstants {
	private final Service service;
	private final Map> genericTypeMap;
	
	public ServiceInfo(Service service) {
		this.service = service;
		genericTypeMap = null == service ? DEFAULT_GENERIC_TYPE_MAP : CodeGenUtils.createMap(service.genericTypes(),
				service.genericTypeClasses(), true);
	}

	/**
	 * @see com.gitee.l0km.codegen.annotations.Service#bridgeType()
	 */
	public Class getBridgeType() {
		return null==service?null:service.bridgeType();
	}

	/**
	 * @see com.gitee.l0km.codegen.annotations.Service#targetType()
	 */
	public Class getTargetType() {
		return null==service?null:service.targetType();
	}

	/**
	 * @see com.gitee.l0km.codegen.annotations.Service#portPrefix()
	 */
	public String getPortPrefix() {
		return null==service?"":service.portPrefix();
	}

	/**
	 * @return genericTypeMap
	 */
	public Map> getGenericTypeMap() {
		return genericTypeMap;
	}
	
	public boolean isAnnotationDefined(){
		return service!=null;
	}

	/**
	 * @param typeName
	 * @see java.util.Map#get(java.lang.Object)
	 */
	public Class getType(String typeName) {
		return genericTypeMap.get(typeName);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy