{"id":17650694,"url":"https://github.com/sebhoss/generic-types","last_synced_at":"2025-03-30T08:22:12.193Z","repository":{"id":57722663,"uuid":"49826055","full_name":"sebhoss/generic-types","owner":"sebhoss","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-08T17:06:51.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T10:23:55.464Z","etag":null,"topics":["generics","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebhoss.png","metadata":{"files":{"readme":"README.asciidoc","changelog":"CHANGELOG.asciidoc","contributing":"CONTRIBUTING.asciidoc","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.asciidoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-17T16:44:56.000Z","updated_at":"2016-01-17T16:55:47.000Z","dependencies_parsed_at":"2022-08-28T08:22:44.247Z","dependency_job_id":null,"html_url":"https://github.com/sebhoss/generic-types","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebhoss%2Fgeneric-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebhoss%2Fgeneric-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebhoss%2Fgeneric-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebhoss%2Fgeneric-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebhoss","download_url":"https://codeload.github.com/sebhoss/generic-types/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246291982,"owners_count":20753984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generics","java"],"created_at":"2024-10-23T11:39:17.156Z","updated_at":"2025-03-30T08:22:12.177Z","avatar_url":"https://github.com/sebhoss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Generic Types image:https://img.shields.io/badge/email-%40metio-brightgreen.svg?style=social\u0026label=mail[\"Discuss on Google Groups\", link=\"https://groups.google.com/forum/#!forum/metio\"] image:https://img.shields.io/badge/irc-%23metio.wtf-brightgreen.svg?style=social\u0026label=IRC[\"Chat on IRC\", link=\"http://webchat.freenode.net/?channels=metio.wtf\"]\nSebastian Hoß \u003chttp://seb.xn--ho-hia.de/[@sebhoss]\u003e\n:github-org: sebhoss\n:project-name: generic-types\n:project-group: de.xn--ho-hia.utils.types\n:coverity-project: 7620\n:codacy-project: 9402c820df454d3a83c697f254aeb1b3\n:toc:\n:toc-placement: preamble\n\nimage:https://img.shields.io/badge/license-cc%20zero-000000.svg?style=flat-square[\"CC Zero\", link=\"http://creativecommons.org/publicdomain/zero/1.0/\"]\npass:[\u003cspan class=\"image\"\u003e\u003ca class=\"image\" href=\"https://maven-badges.herokuapp.com/maven-central/de.xn--ho-hia.utils.types/generic-types\"\u003e\u003cimg src=\"https://img.shields.io/maven-central/v/de.xn--ho-hia.utils.types/generic-types.svg?style=flat-square\" alt=\"Maven Central\"\u003e\u003c/a\u003e\u003c/span\u003e]\npass:[\u003cspan class=\"image\"\u003e\u003ca class=\"image\" href=\"https://www.javadoc.io/doc/de.xn--ho-hia.utils.types/generic-types\"\u003e\u003cimg src=\"https://www.javadoc.io/badge/de.xn--ho-hia.utils.types/generic-types.svg?style=flat-square\u0026color=blue\" alt=\"Read JavaDocs\"\u003e\u003c/a\u003e\u003c/span\u003e]\nimage:https://reposs.herokuapp.com/?path={github-org}/{project-name}\u0026style=flat-square[\"Repository size\"]\nimage:https://www.openhub.net/p/{project-name}/widgets/project_thin_badge.gif[\"Open Hub statistics\", link=\"https://www.openhub.net/p/{project-name}\"]\n\nimage:https://img.shields.io/travis/{github-org}/{project-name}/master.svg?style=flat-square[\"Build Status\", link=\"https://travis-ci.org/{github-org}/{project-name}\"]\nimage:https://img.shields.io/coveralls/{github-org}/{project-name}/master.svg?style=flat-square[\"Code Coverage\", link=\"https://coveralls.io/github/{github-org}/{project-name}\"]\nimage:https://img.shields.io/coverity/scan/{coverity-project}.svg?style=flat-square[\"Coverity Scan Result\", link=\"https://scan.coverity.com/projects/{github-org}-{project-name}\"]\nimage:https://img.shields.io/codacy/grade/{codacy-project}.svg?style=flat-square[\"Codacy Code Quality\", link=\"https://www.codacy.com/app/mail_7/{project-name}\"]\nimage:https://img.shields.io/badge/forkable-yes-brightgreen.svg?style=flat-square[\"Can this project be forked?\", link=\"https://basicallydan.github.io/forkability/?u={github-org}\u0026r={project-name}\"]\nimage:https://img.shields.io/maintenance/yes/2017.svg?style=flat-square[\"Is this thing still maintained?\"]\nimage:https://img.shields.io/bountysource/team/metio/activity.svg?style=flat-square[\"Bounties on open tickets\", link=\"https://www.bountysource.com/teams/metio\"]\n\nThis https://www.java.com[Java] library provides a factory to create generic `java.lang.reflect.Type` variations, such as `Map\u003cNumber, Point\u003e`.\n\n=== Features\n\n* Factory methods to create generic types, including wildcards.\n\n=== Development Status\n\nAll currently required feature are implemented. This project is in maintenance mode.\n\n\n== Usage\n\n[source,java]\n----\n// Map\u003cNumber, Point\u003e\nfinal Type type = GenericTypes.generic(Map.class, Number.class, Point.class);\n\n// List\u003cNumber\u003e\nfinal Type type = GenericTypes.generic(List.class, Number.class);\n----\n\nSuper- and subtypes such as `List\u003c? super Point\u003e` or `List\u003c? extends Number\u003e` can be created in the following way:\n\n[source,java]\n----\n// List\u003c? super Point\u003e\nfinal Type type = GenericTypes.generic(List.class, GenericTypes.supertype(Point.class));\n\n// List\u003c? extends Number\u003e\nfinal Type type = GenericTypes.generic(List.class, GenericTypes.subtype(Number.class));\n----\n\nUse static imports to shorten the above calls to:\n\n[source,java]\n----\n// List\u003c? super Point\u003e\nfinal Type type = generic(List.class, supertype(Point.class));\n\n// List\u003c? extends Number\u003e\nfinal Type type = generic(List.class, subtype(Number.class));\n----\n\nand then go crazy with this:\n\n[source,java]\n----\n// List\u003cMap\u003c? extends Number, ? super Point\u003e\u003e\nfinal Type type = generic(List.class, generic(Map.class, subtype(Number.class), supertype(Point.class)));\n----\n\n=== Integration\n\nTo use this project just declare the following dependency inside your POM:\n\n[source,xml,subs=\"attributes,verbatim\"]\n----\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003e{project-group}\u003c/groupId\u003e\n    \u003cartifactId\u003e{project-name}\u003c/artifactId\u003e\n    \u003cversion\u003e${version.generic-types}\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n----\n\nReplace `${version.generic-types}` with the pass:[\u003ca href=\"http://search.maven.org/#search%7Cga%7C1%7Cg%3Ade.xn--ho-hia.utils.types%20a%3Ageneric-types\"\u003elatest release\u003c/a\u003e]. This project follows the link:http://semver.org/[semantic versioning guidelines].\n\n\n=== Compatibility\n\nThis project is compatible with the following Java versions:\n\n.Java compatibility\n|===\n| | 1.X.Y | 2.X.Y\n\n| Java 8\n| ✓\n| ✓\n|===\n\n== License\n\nTo the extent possible under law, the author(s) have dedicated all copyright\nand related and neighboring rights to this software to the public domain\nworldwide. This software is distributed without any warranty.\n\nYou should have received a copy of the CC0 Public Domain Dedication along\nwith this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.\n\n== Mirrors\n\n* https://github.com/sebhoss/{project-name}\n* https://bitbucket.org/sebhoss/{project-name}\n* https://gitlab.com/sebastian.hoss/{project-name}\n* http://v2.pikacode.com/sebhoss/{project-name}.java\n* http://repo.or.cz/{project-name}.git\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebhoss%2Fgeneric-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebhoss%2Fgeneric-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebhoss%2Fgeneric-types/lists"}