Lecture Notes in Computer Science, 2004, Volume 3286/2004, 319-331, DOI: 10.1007/978-3-540-30175-2_15

Declaring and Enforcing Dependencies Between .NET Custom Attributes

Vasian Cepa and Mira Mezini

View Related Documents

Abstract

Custom attributes as e.g., supported by the .NET framework complemented by pre- or post-processing tools can be used to integrate domain-specific concepts into general-purpose language technology, representing an interesting alternative to domain-specific languages in supporting model-driven development. For this purpose, it is important that dependency relationships between custom attributes, e.g., stating that a certain attribute requires or excludes another attribute, can be specified and checked for during model processing (compilation). Such dependencies can be viewed as an important part of expressing the meta-model of the domain-specific concepts represented by custom attributes.
In this paper, we present an approach to specifying and enforcing dependencies between .NET custom attributes, which naturally extends the built-in .NET support. In this approach, dependencies are specified declaratively by using custom attributes to decorate other custom attributes. Once the dependency declaration is made part of the custom attribute support, one can write tools that enforce dependencies based on .NET meta-program API-s like CodeDom or Reflection. In this paper, we present such a tool, called ADC (for attribute dependency checker).

Fulltext Preview

Image of the first page of the fulltext document