assert eref.getType()==type;
// for elements, you can't use <property>,
// so we allow javaType to appear directly.
BindInfo info = builder.getBindInfo(top);
BIConversion conv = info.get(BIConversion.class);
if(conv!=null) {
conv.markAsAcknowledged();
// the conversion is given.
return conv.getTypeUse(type);
}
detectJavaTypeCustomization();
} else
if( top instanceof XSAttributeDecl ) {
XSAttributeDecl aref = (XSAttributeDecl)top;
assert aref.getType()==type;
detectJavaTypeCustomization();
} else
if( top instanceof XSComplexType ) {
XSComplexType tref = (XSComplexType)top;
assert tref.getBaseType()==type || tref.getContentType()==type;
detectJavaTypeCustomization();
} else
if( top == type ) {
// this means the simple type is built by itself and
// not because it's referenced by something.
} else
// unexpected referer type.
assert false;
// now we are certain that the referer is OK.
// see if it has a conversion customization.
BIConversion conv = getRefererCustomization();
if(conv!=null) {
conv.markAsAcknowledged();
// the conversion is given.
return conv.getTypeUse(type);
} else
// not found
return null;
}