/* (non-Javadoc)
* @see javax.lang.model.util.Elements#getTypeElement(java.lang.CharSequence)
*/
@Override
public TypeElement getTypeElement(CharSequence name) {
LookupEnvironment le = _env.getLookupEnvironment();
final char[][] compoundName = CharOperation.splitOn('.', name.toString().toCharArray());
ReferenceBinding binding = le.getType(compoundName);
// If we didn't find the binding, maybe it's a nested type;
// try finding the top-level type and then working downwards.
if (null == binding) {
ReferenceBinding topLevelBinding = null;
int topLevelSegments = compoundName.length;
while (--topLevelSegments > 0) {
char[][] topLevelName = new char[topLevelSegments][];
for (int i = 0; i < topLevelSegments; ++i) {
topLevelName[i] = compoundName[i];
}
topLevelBinding = le.getType(topLevelName);
if (null != topLevelBinding) {
break;
}
}
if (null == topLevelBinding) {