?? defaulttypecreator.java
字號:
package org.codehaus.xfire.aegis.type;import java.beans.PropertyDescriptor;import java.lang.reflect.Method;import org.codehaus.xfire.XFireRuntimeException;import org.codehaus.xfire.aegis.type.basic.BeanType;import org.codehaus.xfire.aegis.type.basic.BeanTypeInfo;public class DefaultTypeCreator extends AbstractTypeCreator{ public DefaultTypeCreator() { } public DefaultTypeCreator(Configuration configuration) { setConfiguration(configuration); } public TypeClassInfo createClassInfo(Method m, int index) { TypeClassInfo info = new TypeClassInfo(); if (index >= 0) info.setTypeClass(m.getParameterTypes()[index]); else info.setTypeClass(m.getReturnType()); return info; } public TypeClassInfo createClassInfo(PropertyDescriptor pd) { return createBasicClassInfo(pd.getPropertyType()); } public Type createCollectionType(TypeClassInfo info) { if (info.getGenericType() == null) { throw new XFireRuntimeException("Cannot create mapping for " + info.getTypeClass().getName() + ", unspecified component type for " + info.getDescription()); } return createCollectionTypeFromGeneric(info); } public Type createDefaultType(TypeClassInfo info) { BeanType type = new BeanType(); type.setSchemaType(createQName(info.getTypeClass())); type.setTypeClass(info.getTypeClass()); type.setTypeMapping(getTypeMapping()); BeanTypeInfo typeInfo = type.getTypeInfo(); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setExtensibleAttributes(getConfiguration().isDefaultExtensibleAttributes()); typeInfo.setExtensibleElements(getConfiguration().isDefaultExtensibleElements()); return type; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -