if (JL5Flags.isEnumModifier(flags()) && flags().isPrivate()){
if (JL5Flags.isEnumModifier(flags()) && flags().isPrivate() && !type().isInnerClass()){
    public Node typeCheck(TypeChecker tc) throws SemanticException {        if (JL5Flags.isEnumModifier(flags()) && flags().isAbstract()){            throw new SemanticException("Enum types cannot have abstract modifier", this.position());        }        if (JL5Flags.isEnumModifier(flags()) && flags().isPrivate()){            throw new SemanticException("Enum types cannot have explicit private modifier", this.position());        }        if (JL5Flags.isEnumModifier(flags()) && flags().isFinal()){            throw new SemanticException("Enum types cannot have explicit final modifier", this.position());        }        if (JL5Flags.isAnnotationModifier(flags()) && flags().isPrivate()){            throw new SemanticException("Annotation types cannot have explicit private modifier", this.position());        }        if (type().superType() != null && JL5Flags.isEnumModifier(type().superType().toClass().flags())){            throw new SemanticException("Cannot extend enum type", position());        }        JL5TypeSystem ts = (JL5TypeSystem)tc.typeSystem();        ts.checkDuplicateAnnotations(annotations);                if (ts.equals(ts.Object(), type()) && !paramTypes.isEmpty()){            throw new SemanticException("Type: "+type()+" cannot declare type variables.", position());        }                // check not extending java.lang.Throwable (or any of its subclasses)        // with a generic class        if (type().superType() != null && ts.isSubtype(type().superType(), ts.Throwable()) && !paramTypes.isEmpty()){            throw new SemanticException("Cannot subclass java.lang.Throwable or any of its subtypes with a generic class", superClass().position());        }               // check duplicate type variable decls        for (int i = 0; i < paramTypes.size(); i++){            TypeNode ti = (TypeNode)paramTypes.get(i);            for (int j = i+1; j <paramTypes.size(); j++){                TypeNode tj = (TypeNode)paramTypes.get(j);                if (ts.equals(ti.type(), tj.type())){                    throw new SemanticException("Duplicate type variable declaration.", tj.position());                }            }        }                // set up ct with annots        JL5ParsedClassType ct = (JL5ParsedClassType)type();        ct.annotations(this.annotations);        if (JL5Flags.isEnumModifier(flags())){            for(Iterator it = type().constructors().iterator(); it.hasNext(); ){                ConstructorInstance ci = (ConstructorInstance)it.next();                if (!ci.flags().clear(Flags.PRIVATE).equals(Flags.NONE)){                    throw new SemanticException("Modifier "+ci.flags().clear(Flags.PRIVATE)+" not allowed here", ci.position());                }            }        }                checkSuperTypeTypeArgs(tc);                 return super.typeCheck(tc);        }