Example #1
0
        protected virtual void Process(HierarchyMethod parent, ApiTypeParameter typeParameter)
        {
            var hierarchyTypeParameter = CreateHierarchyElementInternal <HierarchyTypeParameter> (parent);

            hierarchyTypeParameter.Init(typeParameter);
            AddTypeParameterGenericConstraints(hierarchyTypeParameter, typeParameter);
            parent.AddMember(hierarchyTypeParameter);
        }
Example #2
0
        public override void Init(ApiElement apiElement)
        {
            base.Init(apiElement);

            apiTypeParameter = EnsureApiElementType <ApiTypeParameter> (apiElement);

            // Unused for now
            //
            // ClassBound = apiTypeParameter.ClassBound;
            // JniClassBound = apiTypeParameter.JniClassBound;
            // InterfaceBounds = apiTypeParameter.InterfaceBounds;
            // JniInterfaceBounds = apiTypeParameter.JniInterfaceBounds;
        }
Example #3
0
        protected void AddTypeParameterGenericConstraints(HierarchyTypeParameter parameter, ApiTypeParameter typeParameter)
        {
            Helpers.ForEachNotNull(typeParameter.ChildElements, (ApiElement e) => {
                switch (e)
                {
                case ApiTypeParameterGenericConstraint constraint:
                    Process(parameter, constraint);
                    break;

                default:
                    Logger.Warning($"Unexpected member type for ApiTypeParameter: '{e.GetType ().FullName}'");
                    break;
                }
            });
        }