GithubHelp home page GithubHelp logo

marioishac / typespecializer Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11 KB

A annotation processor in java that allows specialzied implementations to be returned under the abstract declared type easily.

Java 100.00%
java annotation-processor

typespecializer's Introduction

Type Specializer

Type Specializer makes it easy for specific implementations (subclasses) to be returned under a declared type (the superclass) depending on the type parameters the factory method is provided.

How to Use

In order to get specific implementation I under the declared type A, where I extends A, assuming:

F represents the class that holds the factory method.

FM represents the factory method.

T... represents the type parameters.

CT... represents the Class instances associated with the type parameters.

One would do:

A<T...> specificImplementation = F.FM(CT...);

Upcoming Additions

  1. Automatically fetching specialized type based on subclass declarations rather than explicitly needing to provide them through the annotation.

  2. Criteria for types provided that extends past an exact match (super and extends). For example, a type argument of a subclass of a specialized argument would result in a specialized instance.

  3. Applying criteria to types based on attributes other than position. (For example, applying criteria to any type that is present among the type arguments list rather than the type argument at a certain index).

typespecializer's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.