kbuilder.getPackageRegistry( def.getSuperClass() ).getTraitRegistry().getTraitables().containsKey( def.getSuperClass() )
)) {
// traitable
if ( type.isNovel() ) {
try {
PackageRegistry reg = kbuilder.getPackageRegistry( typeDescr.getNamespace() );
String availableName = typeDescr.getType().getFullName();
Class<?> resolvedType = reg.getTypeResolver().resolveType( availableName );
updateTraitDefinition( type,
resolvedType,
false );
} catch ( ClassNotFoundException cnfe ) {
// we already know the class exists
}
}
pkgRegistry.getTraitRegistry().addTraitable( def );
} else if (type.getKind().equals(TypeDeclaration.Kind.TRAIT)
|| typeDescr.hasAnnotation(Trait.class) ) {
// trait
if ( ! type.isNovel() ) {
try {
PackageRegistry reg = kbuilder.getPackageRegistry(typeDescr.getNamespace());
String availableName = typeDescr.getType().getFullName();
Class<?> resolvedType = reg.getTypeResolver().resolveType(availableName);
if (!Thing.class.isAssignableFrom(resolvedType)) {
updateTraitDefinition( type,
resolvedType,
false );