Method method, Location location)
{
Asset asset = method.getAnnotation(Asset.class);
String propertyName = AnnotationUtils.getPropertyName(method);
IAssetSpecification as = new AssetSpecification();
as.setPath(asset.value());
as.setPropertyName(propertyName);
// Very important for assets, as they need a location (really, the Resource
// of a location) to figure out what kind of asset they are.
Resource specResource = spec.getSpecificationLocation();
Location assetLocation = new AnnotationLocation(specResource, location.toString());
as.setLocation(assetLocation);
spec.addAsset(propertyName, as);
}