}
private FieldRelationInfo getFieldRelationInfo(FieldDoc field) {
Type type = field.type();
if(type.isPrimitive() || type instanceof WildcardType || type instanceof TypeVariable)
return null;
if (type.dimension().endsWith("[]")) {
return new FieldRelationInfo(type.asClassDoc(), true);
}
Options opt = optionProvider.getOptionsFor(type.asClassDoc());
if (opt.matchesCollPackageExpression(type.qualifiedTypeName())) {
Type[] argTypes = getInterfaceTypeArguments(collectionClassDoc, type);
if (argTypes != null && argTypes.length == 1) {
return new FieldRelationInfo(argTypes[0].asClassDoc(), true);
}
argTypes = getInterfaceTypeArguments(mapClassDoc, type);
if (argTypes != null && argTypes.length == 2) {
return new FieldRelationInfo(argTypes[1].asClassDoc(), true);
}
}
return new FieldRelationInfo(type.asClassDoc(), false);
}