(3) require the super-class to also be a container of its corresponding type parameter.
778173
private boolean containerOfSubtyping(
      Set<String> containerTypeParameters,
      AnnotationInfo annotation,
      TypeVariableSymbol typaram,
      Type tyargument) {
    // (1)
    if (!tyargument.hasTag(TypeTag.TYPEVAR)) {
      return false;
    }
    // (2)
    if (!containerTypeParameters.contains(tyargument.asElement().getSimpleName().toString())
        || isTypeParameterThreadSafe(
            (TypeVariableSymbol) tyargument.asElement(), containerTypeParameters)) {
      return false;
    }
    // (3)
    if (annotation.containerOf().contains(typaram.getSimpleName().toString())) {
      return false;
    }
    return true;
  }
777714
@Override
	public void require(int type, String namespace, String name) throws KriptonRuntimeException, IOException {
		if (type != this.type || (namespace != null && !namespace.equals(getNamespace())) || (name != null && !name.equals(getName()))) {
			throw new KriptonRuntimeException("expected: " + TYPES[type] + " {" + namespace + "}" + name, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
	}
139533
private void putSuperAndThisConstructorSymbols()
  {
    IGosuClassInternal thisClass = getGosuClass();
    IGosuClassInternal superClass = thisClass.getSuperClass();
    if( superClass != null )
    {
      for( DynamicFunctionSymbol dfs : superClass.getConstructorFunctions() )
      {
        if( superClass.isAccessible( getGosuClass(), dfs ) )
        {
          dfs = new SuperConstructorFunctionSymbol( superClass.isParameterizedType()
                                                    ? dfs.getParameterizedVersion( superClass )
                                                    : dfs );
          getSymbolTable().putSymbol( dfs );
          getOwner().putDfsDeclInSetByName( dfs );
        }
      }
    }
    for( DynamicFunctionSymbol dfs : thisClass.getConstructorFunctions() )
    {
      dfs = new ThisConstructorFunctionSymbol( dfs );
      getSymbolTable().putSymbol( dfs );
      getOwner().putDfsDeclInSetByName( dfs );
    }
  }
1226770
public static TypeDef typeImplements(TypeDef base, ClassRef... superClass) {
        return new TypeDefBuilder(base)
                .withImplementsList(superClass)
                .build();
    }
635547
def _joinclass(codtuple):
    
    if not isinstance(codtuple, tuple):
        raise TypeError("argument must be tuple, was %s" % type(codtuple))
    if len(codtuple) != 3:
        raise ValueError("tuple must have 3 items, has %d" % len(codtuple))

    serviceclass = codtuple[0] << 2 << 11
    majorclass = codtuple[1] << 2 << 6
    minorclass = codtuple[2] << 2
    return (serviceclass | majorclass | minorclass)
133275
function Type(name, super_types, fs) {
  this.super_types = [];
  this.name = name;
  if (super_types) {
    this.super_types = super_types;
  }
  this.fs = fs;
}
1079397
private static Class <?> type2class(Type type){
		if(type instanceof Class <?>){
			return (Class <?>) type;	//base case
		}else if(type instanceof ParameterizedType){
			return type2class( ((ParameterizedType) type).getRawType() );
		}else if(type instanceof TypeVariable<?>){
			return type2class( ((TypeVariable<?>) type).getBounds()[0] );
		}else if(type instanceof WildcardType){
			return type2class( ((WildcardType) type).getUpperBounds()[0] );
		}else{
			throw new IllegalArgumentException("Cannot convert type to class: " + type);
		}
	}
244067
function _gpfProcessDefineParamsCheck (params) {
    _gpfAsserts({
        "name is required (String)": "string" === typeof params[_GPF_DEFINE_PARAM_NAME],
        "Super is required and must resolve to a Constructor": params[_GPF_DEFINE_PARAM_SUPER] instanceof Function,
        "definition is required (Object)": "object" === typeof params[_GPF_DEFINE_PARAM_DEFINITION]
    });
}
1060091
def super_and_sub?(sup, sub)
      fqsup = qualify(sup)
      cls = qualify(store.get_superclass(sub), sub)
      until cls.nil?
        return true if cls == fqsup
        cls = qualify(store.get_superclass(cls), cls)
      end
      false
    end
1288837
def _PrepareForNextContainerType(self):
    
    self._active_container_type = self._container_types.pop(0)

    self._add_active_container_method = self._add_container_type_methods.get(
        self._active_container_type)

    query = 'SELECT _identifier, _data FROM {0:s}'.format(
        self._active_container_type)
    self._cursor.execute(query)

    self._active_cursor = self._cursor
1166145
function _gpfDefineCore (name, Super, definition) {
    var NewClass = _gpfDefineFactory(name, Super, definition);
    _gpfDefineUpdateContext(name, NewClass);
    return NewClass;
}
594979
def subset?(other)
      raise(ISO8601::Errors::TypeError, "The parameter must be an instance of #{self.class}") \
        unless other.is_a?(self.class)

      other.include?(first) && other.include?(last)
    end
449049
def _subclass_container(self):
        
        _parent_class = self

        class GetWrapper(Get):

            def __init__(self):
                self._parent_class = _parent_class

        class PostWrapper(Post):

            def __init__(self):
                self._parent_class = _parent_class

        class PutWrapper(Put):

            def __init__(self):
                self._parent_class = _parent_class

        class PatchWrapper(Patch):

            def __init__(self):
                self._parent_class = _parent_class

        class DeleteWrapper(Delete):

            def __init__(self):
                self._parent_class = _parent_class

        class InteractiveWrapper(Interactive):

            def __init__(self):
                self._parent_class = _parent_class

        return {"get": GetWrapper,
                "post": PostWrapper,
                "put": PutWrapper,
                "patch": PatchWrapper,
                "delete": DeleteWrapper,
                "interactive": InteractiveWrapper}
229269
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlBehaviorUnit == null) {
			this.container = container;
			this.sarlBehaviorUnit = SarlFactory.eINSTANCE.createSarlBehaviorUnit();
			this.sarlBehaviorUnit.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
			this.sarlBehaviorUnit.setName(newTypeRef(container, name));
			container.getMembers().add(this.sarlBehaviorUnit);
		}
	}
1326551
private void assignInstancesToContainers(PackingPlanBuilder planBuilder,
                                           Map<String, Integer> parallelismMap,
                                           PolicyType policyType)
      throws ConstraintViolationException {
    for (String componentName : parallelismMap.keySet()) {
      int numInstance = parallelismMap.get(componentName);
      for (int i = 0; i < numInstance; ++i) {
        policyType.assignInstance(planBuilder, componentName, this);
      }
    }
  }
468632
void addSuperclass(final String superclassName, final Map<String, ClassInfo> classNameToClassInfo) {
        if (superclassName != null && !superclassName.equals("java.lang.Object")) {
            final ClassInfo superclassClassInfo = getOrCreateClassInfo(superclassName, /* classModifiers = */ 0,
                    classNameToClassInfo);
            this.addRelatedClass(RelType.SUPERCLASSES, superclassClassInfo);
            superclassClassInfo.addRelatedClass(RelType.SUBCLASSES, this);
        }
    }
88914
public static <T1, T2, T3> TypeFactory<Tuple3<T1, T2, T3>> typeFactory( TypeFactory<T1> type1,
                                                                            TypeFactory<T2> type2,
                                                                            TypeFactory<T3> type3 ) {
        return new Tuple3TypeFactory<>(type1, type2, type3);
    }