JAVA_CLASS = getClass(Names.java); SCALA_CLASS = getClass(Names.scala);
JAVA_CLASS = getModule(Names.java).moduleClass(); SCALA_CLASS = getModule(Names.scala).moduleClass();
    public Definitions(Global global) {        // make definitions accessible earlier to other components        global.definitions = this;        // create attributed tree typer        atyper = new ATreeTyper(global, this);        // the root package        ROOT_CLASS = ClassSymbol.newRootClass(new PackageParser(global));        // the java and scala packages        JAVA_CLASS = getClass(Names.java);        SCALA_CLASS = getClass(Names.scala);        // the top and bottom classes        ANY_CLASS = newClass(SCALA_CLASS, Names.Any, 0);        ANYVAL_CLASS = getClass(Names.scala_AnyVal);        ANYREF_CLASS = newAlias(SCALA_CLASS, Names.AnyRef, 0);        ALLREF_CLASS = newClass(SCALA_CLASS, Names.AllRef, 0);        ALL_CLASS = newClass(SCALA_CLASS, Names.All, 0);        // the java classes        OBJECT_CLASS = getClass(Names.java_lang_Object);        THROWABLE_CLASS = getClass(Names.java_lang_Throwable);        STRING_CLASS = getClass(Names.java_lang_String);        // the scala value classes        UNIT_CLASS = getClass(Names.scala_Unit);        BOOLEAN_CLASS = getClass(Names.scala_Boolean);        BYTE_CLASS = getClass(Names.scala_Byte);        SHORT_CLASS = getClass(Names.scala_Short);        CHAR_CLASS = getClass(Names.scala_Char);        INT_CLASS = getClass(Names.scala_Int);        LONG_CLASS = getClass(Names.scala_Long);        FLOAT_CLASS = getClass(Names.scala_Float);        DOUBLE_CLASS = getClass(Names.scala_Double);        // the scala reference classes        SCALAOBJECT_CLASS = getClass(Names.scala_ScalaObject);        REF_CLASS = getClass(Names.scala_Ref);        for (int i = 1; i < TUPLE_COUNT; i++) {            TUPLE_CLASS[i] = getClass(Names.scala_Tuple(i));            TUPLE_FIELD[i] = new Symbol[i];        }        for (int i = 0; i < FUNCTION_COUNT; i++)            FUNCTION_CLASS[i] = getClass(Names.scala_Function(i));        PARTIALFUNCTION_CLASS = getClass(Names.scala_PartialFunction);        ITERABLE_CLASS = getClass(Names.scala_Iterable);        ITERATOR_CLASS = getClass(Names.scala_Iterator);        SEQ_CLASS = getClass(Names.scala_Seq);        LIST_CLASS = getClass(Names.scala_List);        NIL = getModule(Names.scala_Nil);        CONS_CLASS = getClass(Names.scala_COLONCOLON);        ARRAY_CLASS = getClass(Names.scala_Array);        PREDEF = getModule(Names.scala_Predef);        CONSOLE = getModule(Names.scala_Console);        MATCHERROR = getModule(Names.scala_MatchError);        // initialize generated classes and aliases        initClass(ANY_CLASS, Type.EMPTY_ARRAY);        initAlias(ANYREF_CLASS, OBJECT_TYPE());        initClass(ALLREF_CLASS, new Type[]{ANYREF_TYPE()});        initClass(ALL_CLASS, new Type[]{ANY_TYPE()});        // create type symbols        UNIT_TYPE    = newTypeSymbol(Names.Unit   ,UNIT_CLASS   .staticType());        BOOLEAN_TYPE = newTypeSymbol(Names.Boolean,BOOLEAN_CLASS.staticType());        BYTE_TYPE    = newTypeSymbol(Names.Byte   ,BYTE_CLASS   .staticType());        SHORT_TYPE   = newTypeSymbol(Names.Short  ,SHORT_CLASS  .staticType());        CHAR_TYPE    = newTypeSymbol(Names.Char   ,CHAR_CLASS   .staticType());        INT_TYPE     = newTypeSymbol(Names.Int    ,INT_CLASS    .staticType());        LONG_TYPE    = newTypeSymbol(Names.Long   ,LONG_CLASS   .staticType());        FLOAT_TYPE   = newTypeSymbol(Names.Float  ,FLOAT_CLASS  .staticType());        DOUBLE_TYPE  = newTypeSymbol(Names.Double ,DOUBLE_CLASS .staticType());        ARRAY_TYPE   = newTypeSymbol(Names.Array  ,            ARRAY_CLASS.staticType(new Type[]{ANYREF_TYPE()}));        // add members to scala.Any        ANY_EQ       = newTerm(ANY_CLASS, Names.eq          , 0);        ANY_EQEQ     = newTerm(ANY_CLASS, Names.EQEQ        , Modifiers.FINAL);        ANY_BANGEQ   = newTerm(ANY_CLASS, Names.BANGEQ      , Modifiers.FINAL);        ANY_EQUALS   = newTerm(ANY_CLASS, Names.equals      , 0);        ANY_HASHCODE = newTerm(ANY_CLASS, Names.hashCode    , 0);        ANY_TOSTRING = newTerm(ANY_CLASS, Names.toString    , 0);        // ANY_PLUS  = newTerm(ANY_CLASS, Names.PLUS        , Modifiers.FINAL);        ANY_IS       = newTerm(ANY_CLASS, Names.isInstanceOf, Modifiers.FINAL);        ANY_AS       = newTerm(ANY_CLASS, Names.asInstanceOf, Modifiers.FINAL);        ANY_MATCH    = newTerm(ANY_CLASS, Names.match       , Modifiers.FINAL);        initMethod(ANY_EQ      , new Type[]{ANY_TYPE()}   , BOOLEAN_TYPE());        initMethod(ANY_EQEQ    , new Type[]{ANY_TYPE()}   , BOOLEAN_TYPE());        initMethod(ANY_BANGEQ  , new Type[]{ANY_TYPE()}   , BOOLEAN_TYPE());        initMethod(ANY_EQUALS  , new Type[]{ANY_TYPE()}   , BOOLEAN_TYPE());        initMethod(ANY_HASHCODE, new Type[]{}             , INT_TYPE());        initMethod(ANY_TOSTRING, new Type[]{}             , STRING_TYPE());        // initMethod(ANY_PLUS , new Type[]{STRING_TYPE()}, STRING_TYPE());        Symbol[] ANY_IS_TPARAMS = {newTParam(ANY_IS, 0, ANY_TYPE())};        ANY_IS.setInfo(Type.PolyType(ANY_IS_TPARAMS, BOOLEAN_TYPE()));        Symbol[] ANY_AS_TPARAMS = {newTParam(ANY_AS, 0, ANY_TYPE())};        ANY_AS.setInfo(Type.PolyType(ANY_AS_TPARAMS,ANY_AS_TPARAMS[0].type()));        Symbol[] ANY_MATCH_TPARAMS = {            newTParam(ANY_MATCH, 0, ANY_TYPE()),            newTParam(ANY_MATCH, 1, ANY_TYPE())};        Symbol[] ANY_MATCH_VPARAMS = {            newVParam(ANY_MATCH, 0, FUNCTION_TYPE(                new Type[]{ANY_MATCH_TPARAMS[0].type()},                ANY_MATCH_TPARAMS[1].type()))};        ANY_MATCH.setInfo(            Type.PolyType(                ANY_MATCH_TPARAMS,                Type.MethodType(                    ANY_MATCH_VPARAMS,                    ANY_MATCH_TPARAMS[1].type())));        // add members to java.lang.Object        OBJECT_SYNCHRONIZED =            newTerm(OBJECT_CLASS, Names.synchronized_, Modifiers.FINAL);        Symbol OBJECT_SYNCHRONIZED_TPARAM =            newTParam(OBJECT_SYNCHRONIZED,0,ANY_TYPE());        Symbol OBJECT_SYNCHRONIZED_VPARAM =            newVParam(OBJECT_SYNCHRONIZED,0,OBJECT_SYNCHRONIZED_TPARAM.type());        OBJECT_SYNCHRONIZED.setInfo(            Type.PolyType(                new Symbol[] {OBJECT_SYNCHRONIZED_TPARAM},                Type.MethodType(                    new Symbol[] {OBJECT_SYNCHRONIZED_VPARAM},                    OBJECT_SYNCHRONIZED_TPARAM.type())));        // add members to java.lang.String        STRING_PLUS = newTerm(STRING_CLASS, Names.PLUS, Modifiers.FINAL);        initMethod(STRING_PLUS, new Type[]{ANY_TYPE()}, STRING_TYPE());        // add members to java.lang.Throwable        THROWABLE_THROW =newTerm(THROWABLE_CLASS,Names.throw_,Modifiers.FINAL);        THROWABLE_THROW.setInfo(Type.PolyType(Symbol.EMPTY_ARRAY, ALL_TYPE()));        // create global values        PATTERN_WILDCARD = new TermSymbol(            Position.NOPOS, Names.PATTERN_WILDCARD, Symbol.NONE, 0);        PATTERN_WILDCARD.setInfo(ALL_TYPE());        // initialize unboxed types in class Type        Type.initializeUnboxedTypes(this);    }