Metamodel constraints can be specified in declarative languages (e.g. OCL, Prolog) or, alternatively, in Java.
Constraints on metamodels can be specified either in declarative languages like OCL or Prolog, or in Java code.