Giter Site home page Giter Site logo

abap-annotation-processing's Introduction

AAP - ABAP Annotation Processing Build Status ABAP Doc License: MIT

Annotations in ABAP!

This project is a technology study / proof of concept of implementing a framework to manage class based annotations in ABAP. Since there is no native language support for annotations the assignments are done in customizing tables. The current state is still very much unfinished and not production ready. I am currently not planning on finishing this project (the necessary efforts and drawbacks are way too high). Feel free to fork it or take parts of it for reference.

DO NOT USE IN PRODUCTION.

Using annotations in ABAP code

DATA: lo_annotation TYPE REF TO zcl_my_annotation.

DATA(lo_annotated_class) = NEW zcl_annotated_class( ).

DATA(lo_processor) = zcl_aap_proc_object=>from_object( lo_annotated_class ).
IF lo_processor->is_annotation_present_by_data( lo_annotation ).
  lo_annotation ?= lo_processor->get_annotation_by_data( lo_annotation ).
  WRITE lo_annotation->mv_my_attribute.
ENDIF.

More example code

Adding annotations to classes/interfaces/attributes/methods/parameters

Using transaction ZAAP_CUST: Transaction ZAAP_CUST

API Overview

API Overview Detailed class diagram

License

MIT License Copyright (c) 2017 Fabian Lupa

abap-annotation-processing's People

Contributors

fabianlupa avatar larshp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gepparta

abap-annotation-processing's Issues

Set up a deployment concept

  • Using abapGit
  • And or using transport of copies

Developer documentation (abapDoc) should also be deployed somewhere (github pages?).

Eclipse IDE integration

Something like "Add annotation" in the quick assist popup for classes, attributes, methods, parameters.

Refactor exceptions

  • CX_DYNAMIC_CHECK
    • Caller is responsible for the error (user mistake for not respecting pre conditions or parameter documentation), exception should not be caught
  • CX_STATIC_CHECK
    • Expected fail state of the api, caller should (and should be able to) handle this error, exception should be caught
  • CX_NO_CHECK
    • Internal error, should not be caught
  • ASSERT
    • Internal state validation, should never fail, if it does there is a programming error in the library

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.