Types

argument — Represents an argument to a method
annotation — User-defined metadata
assembly (C#/CIL) — An assembly in the analyzed system
resource bundle — A collection of resources in the analyzed system
call — Represents a method call
catch — A catch of some exception type in a method
class — Represents a Java class in the analyzed system
date — Represents a date
field — Represents a field in a Java class in the analyzed system
field reference — Represents a reference within a method to a field
integer — An integer numeric value
member — A class member; a method or field
method — Represents a method in a class in the analyzed system
object — The root of the type tree
package (Java)/namespace (C#/CIL) — Represents a java package or a namespace in C#/CIL
reference — Represents a reference to a program construct from within a Java class in the analyzed system
string — A string value
string constant — Represents a string constant that appears in one or more classes in the analyzed system
string constant reference — Represents a reference within a method to a string constant
string resource — A named value representing a string, defined in a .properties or resource file
type — Represents a Java type

BBQ supports several data types, which are arranged in a derivation hierarchy. All types are derived, directly or indirectly, from the base type object.

(Diagram illustrating type hierarchy)

Note that the type Type represents a type in Java (such as int, boolean, etc.) which is a completely different than types within the query language.

Set expressions have a type, which is the most-derived common type of all the objects in the resulting set. Filters and transforms may be applicable to only some types; BBQ determines the type of the expression at every point of transform using these rules:

Combining expressions with set operators produces a compound expression; if the two set expressions have different types than the type of the compound expression is the most-derived type that is the ancestor of both constituent types in the set expression.

Similarly, combining filters with a logical operator produces a compound filter. If the two filters are applicable to different types, the applicable type for one of the filters must be derived from the applicable type of the other filter, and the applicable type of the compound filter is the most-derived type.

When you combine two transforms with a set operator, both kinds of type resolution may happen. If the transforms have different applicable types, one must derive from the other and the applicable type of the compound transform is the most derived type. If the transforms have different result types, the result type of the compound transform is the most-derived type that is an ancestor of each of the constituent result types.

browse-by-query home antlersoft free software sourceforge project page