Skip to content

Famix Java

Famix Java is the metamodel included in Moose used to represent any Java application. As you can imagine, the metamodel is rather than complicated. For instance, Famix Java uses a lot the traits concept.

We will present here some incorrect, but simple and useful views to enable beginners to use Famix Java.

attributes
attributes
*
*
subclass
subclass
superInheritances
superInheritances
superclass
superclass
subInheritances
subInheritances
methods
methods
FamixJavaClass FamixJavaInheritance
sender
sender
0..*
0..*
0..*
0..*
candidates
candidates
0..*
0..*
*
*
FamixJavaMethod FamixJavaAttribute
types
types
FamixJavaPackage
parentPackage
parentPackage
FamixJavaInvocation FamixJavaAccess
Text is not SVG - cannot display

Most of the time, you only need to understand these core entities to start analyzing your application. You can retrieve the main concepts: Packages, Classes, Methods and Attributes. You’ll notice that relation between Methods and Attribute is made from the Access reification, as well as Method invocation through the Invocation concept.

The complete meta-model is not represented here. For instance, it also includes LocalVariable, Parameters, ParametricClasses and a lot more.

In Moose, all relation are bi-directional. We added the arrow on relation based on common usage, but you can always go the other way around.

FamixJavaMethod
methods
methods
0..*
0..*
FamixJavaType FamixJavaAttribute
0..*
0..*
FamixJavaClass
attributes
attributes
FamixJavaInterface FamixJavaEnum FamixJavaPrimitiveType FamixJavaWildcard FamixJavaParametricInterface FamixJavaParametricClass FamixJavaException
Text is not SVG - cannot display

Types are the central pieces of Object-Oriented programming languages. In the FamixJava meta-model, all types are subclass of the FamixJavaType concept. In addition to the FamixJavaClass previously described, we represent Interface, Enum, PrimitiveType, ParameterType, and Wildcard.

ParameterType and Wildcard are mostly used when looking for parametric type.

Primitive type are made to represent int, double, long, etc. in Java, as well as void if necessary.

Parametric types are probably the most hard to understand. We made a full blog post about this subject.

TAssociation
concretisations
concretisations
parameterConcretisations
parameterConcretisations
TConcretisation
generics
generics
concreteParameter
concreteParameter
TParameterConretisation
genericEntity
genericEntity
concretisations
concretisations
concreteEntities
concreteEntities
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22concreteEntities%22%20style%3D%22edgeLabel%3Bhtml%3D1%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Bresizable%3D0%3Bpoints%3D%5B%5D%3B%22%20vertex%3D%221%22%20connectable%3D%220%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22315.5998976950898%22%20y%3D%22363.5856861159767%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22concreteEntities%22%20style%3D%22edgeLabel%3Bhtml%3D1%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3Bresizable%3D0%3Bpoints%3D%5B%5D%3B%22%20vertex%3D%221%22%20connectable%3D%220%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22315.5998976950898%22%20y%3D%22363.5856861159767%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
concreteParameters
concreteParameters
TParametricEntity
+ isGeneric()
+isConcrete()
+ isGeneric()...
ParametricEntity Method ParametricInterface Interface ParametricClass Class
concreteEntity
concreteEntity
genericEntities
genericEntities
TConcreteParameterType TGenericParameterType ParameterType TThrowable TWithInterface Type
concretisations
concretisations
genericParameter
genericParameter
genericEntities
genericEntities
genericParameters
genericParameters
Text is not SVG - cannot display