builtinTypes = new HashMap<String, TypeDeclaration>();
initBuiltinTypeDeclarations();
}
private void initBuiltinTypeDeclarations() {
TypeDeclaration colType = new TypeDeclaration( "Collection" );
colType.setTypesafe( false );
colType.setTypeClass( Collection.class );
builtinTypes.put( "java.util.Collection",
colType );
TypeDeclaration mapType = new TypeDeclaration( "Map" );
mapType.setTypesafe( false );
mapType.setTypeClass( Map.class );
builtinTypes.put( "java.util.Map",
mapType );
TypeDeclaration activationType = new TypeDeclaration( "Activation" );
activationType.setTypesafe( false );
activationType.setTypeClass( Activation.class );
builtinTypes.put( Activation.class.getCanonicalName(),
activationType );
TypeDeclaration thingType = new TypeDeclaration( Thing.class.getName() );
thingType.setFormat( TypeDeclaration.Format.TRAIT );
thingType.setTypeClass( Thing.class );
builtinTypes.put( Thing.class.getCanonicalName(),
thingType );
ClassDefinition def = new ClassDefinition();
def.setClassName( thingType.getTypeClass().getName() );
def.setDefinedClass( Thing.class );
TraitRegistry.getInstance().addTrait( def );