public TypeClassInfo createClassInfo(Field f) { TypeClassInfo info = createBasicClassInfo(f.getType()); info.setDescription("field " + f.getName() + " in " + f.getDeclaringClass()); return info; }
public TypeClassInfo createClassInfo(Field f) { TypeClassInfo info = createBasicClassInfo(f.getType()); info.setDescription("field " + f.getName() + " in " + f.getDeclaringClass()); return info; }
public TypeClassInfo createBasicClassInfo(Type type) { TypeClassInfo info = new TypeClassInfo(); Class<?> typeClass = TypeUtil.getTypeClass(type, false); if (typeClass != null) { info.setDescription("class '" + typeClass.getName() + "'"); } else { info.setDescription("type '" + type + "'"); } info.setType(type); return info; }
/** * Create type information for a <code>Field</code>. * * @param f the field to create a type from */ public AegisType createType(Field f) { TypeClassInfo info = createClassInfo(f); info.setDescription("field " + f.getName() + " in " + f.getDeclaringClass()); return createTypeForClass(info); }
public TypeClassInfo createBasicClassInfo(Type type) { TypeClassInfo info = new TypeClassInfo(); Class<?> typeClass = TypeUtil.getTypeClass(type, false); if (typeClass != null) { info.setDescription("class '" + typeClass.getName() + "'"); } else { info.setDescription("type '" + type + "'"); } info.setType(type); return info; }
/** * Create a AegisType for a Method parameter. * * @param m the method to create a type for * @param index The parameter index. If the index is less than zero, the * return type is used. */ public AegisType createType(Method m, int index) { TypeClassInfo info = createClassInfo(m, index); info.setDescription((index == -1 ? "return type" : "parameter " + index) + " of method " + m.getName() + " in " + m.getDeclaringClass()); return createTypeForClass(info); }
/** * Create type information for a <code>Field</code>. * * @param f the field to create a type from */ public AegisType createType(Field f) { TypeClassInfo info = createClassInfo(f); info.setDescription("field " + f.getName() + " in " + f.getDeclaringClass()); return createTypeForClass(info); }
public AegisType createType(Class<?> clazz) { TypeClassInfo info = createBasicClassInfo(clazz); info.setDescription(clazz.toString()); return createTypeForClass(info); }
/** * Create type information for a PropertyDescriptor. * * @param pd the propertydescriptor */ public AegisType createType(PropertyDescriptor pd) { TypeClassInfo info = createClassInfo(pd); info.setDescription("property " + pd.getName()); return createTypeForClass(info); }
/** * Create type information for a PropertyDescriptor. * * @param pd the propertydescriptor */ public AegisType createType(PropertyDescriptor pd) { TypeClassInfo info = createClassInfo(pd); info.setDescription("property " + pd.getName()); return createTypeForClass(info); }
/** * Create a AegisType for a Method parameter. * * @param m the method to create a type for * @param index The parameter index. If the index is less than zero, the * return type is used. */ public AegisType createType(Method m, int index) { TypeClassInfo info = createClassInfo(m, index); info.setDescription((index == -1 ? "return type" : "parameter " + index) + " of method " + m.getName() + " in " + m.getDeclaringClass()); return createTypeForClass(info); }
@Override public TypeClassInfo createClassInfo(Method m, int index) { TypeClassInfo info = new TypeClassInfo(); info.setDescription("method " + m.getName() + " parameter " + index); if (index >= 0) { info.setType(m.getParameterTypes()[index]); } else { info.setType(m.getReturnType()); } return info; }
public AegisType createType(Class<?> clazz) { TypeClassInfo info = createBasicClassInfo(clazz); info.setDescription(clazz.toString()); return createTypeForClass(info); }
@Override public TypeClassInfo createClassInfo(Method m, int index) { TypeClassInfo info = new TypeClassInfo(); info.setDescription("method " + m.getName() + " parameter " + index); if (index >= 0) { info.setType(m.getParameterTypes()[index]); } else { info.setType(m.getReturnType()); } return info; }
/** * Create an Aegis type from a reflected type description. * This will only work for the restricted set of collection * types supported by Aegis. * @param t the reflected type. * @return the type */ public AegisType createType(Type t) { TypeClassInfo info = new TypeClassInfo(); info.setType(t); info.setDescription("reflected type " + t.toString()); return createTypeForClass(info); }
/** * Create an Aegis type from a reflected type description. * This will only work for the restricted set of collection * types supported by Aegis. * @param t the reflected type. * @return the type */ public AegisType createType(Type t) { TypeClassInfo info = new TypeClassInfo(); info.setType(t); info.setDescription("reflected type " + t.toString()); return createTypeForClass(info); }
@Override public TypeClassInfo createClassInfo(PropertyDescriptor pd) { Element mapping = findMapping(pd.getReadMethod().getDeclaringClass()); if (mapping == null) { return nextCreator.createClassInfo(pd); } Element propertyEl = getMatch(mapping, "./property[@name='" + pd.getName() + "']"); if (propertyEl == null) { return nextCreator.createClassInfo(pd); } TypeClassInfo info = new TypeClassInfo(); Type returnType = pd.getReadMethod().getGenericReturnType(); info.setType(returnType); info.setDescription("property " + pd.getDisplayName()); readMetadata(info, mapping, propertyEl); return info; }
@Override public TypeClassInfo createClassInfo(PropertyDescriptor pd) { Element mapping = findMapping(pd.getReadMethod().getDeclaringClass()); if (mapping == null) { return nextCreator.createClassInfo(pd); } Element propertyEl = getMatch(mapping, "./property[@name='" + pd.getName() + "']"); if (propertyEl == null) { return nextCreator.createClassInfo(pd); } TypeClassInfo info = new TypeClassInfo(); Type returnType = pd.getReadMethod().getGenericReturnType(); info.setType(returnType); info.setDescription("property " + pd.getDisplayName()); readMetadata(info, mapping, propertyEl); return info; }
info.setDescription(clazz.toString()); info.setType(paramType, paramType instanceof ParameterizedType ? pm : null);
} else { info = new TypeClassInfo(); info.setDescription("method " + m.getName() + " parameter " + index); info.setType(genericType); } else { info = new TypeClassInfo(); info.setDescription("method " + m.getName() + " parameter " + index); info.setType(genericReturnType);