// Iterate and for each typedeclr assign it's value if it's not already set
// We start from the rear as those are the furthest away classes and interfaces
TypeDeclaration[] tarray = tdecls.toArray( new TypeDeclaration[tdecls.size()] );
for (int i = tarray.length - 1; i >= 0; i--) {
TypeDeclaration currentTDecl = tarray[i];
if (!isSet( typeDeclaration.getSetMask(),
TypeDeclaration.ROLE_BIT ) && isSet( currentTDecl.getSetMask(),
TypeDeclaration.ROLE_BIT )) {
typeDeclaration.setRole( currentTDecl.getRole() );
}
if (!isSet( typeDeclaration.getSetMask(),
TypeDeclaration.FORMAT_BIT ) && isSet( currentTDecl.getSetMask(),
TypeDeclaration.FORMAT_BIT )) {
typeDeclaration.setFormat( currentTDecl.getFormat() );
}
if (!isSet( typeDeclaration.getSetMask(),
TypeDeclaration.TYPESAFE_BIT ) && isSet( currentTDecl.getSetMask(),
TypeDeclaration.TYPESAFE_BIT )) {
typeDeclaration.setTypesafe( currentTDecl.isTypesafe() );
}
}
this.cacheTypes.put( cls.getName(),
typeDeclaration );