Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 694 papers for “Java annotation”

Semantic Annotation for Java

2015

This paper describes how to use annotation to provide semantic information. The applications include the automatic construction of a GUI so that the user input is constrained to a correct range (guarding the input). Elementary GUI examples include elements for a variety of data types. Given sufficient effort, we envision the annotation technique as a replacement for XML and BeanInfo-based systems. We show that semantic annotation has several intrinsic benefits, geographically co-locating constraints with their parameters eases maintenance, enables compile-time checking, and establishes consistent constraint declarations. Semantic annotation is shown to be GUI agnostic (devoid of Swing, SWT, AWT or HTML considerations). We also show how GUI annotation can be considered dangerous. The automatically constructed GUI’s are simple, and of no intellectual merit, other than their construction technique.

Cited by 0

A Java Movie Clip Annotation Tool

Timothy Chien, Aup Advisor, Glorianna I. Davenport · 1996

1. Abstract page 2 2. Introduction page 3 3. Overview of System Design page 4 4. Implementation page 7 5. Conclusion page 11

Cited by 0

Jppal: Java parallel programming annotation library

Edgar Sousa, João L. Sobral · 2015

This paper describes an annotation language for parallel program-ming. This language is completely implemented as a library of aspects, in AspectJ, and mimics the semantics of the OpenMP standard. We discuss the language implementation and the difficul-ty in implementing certain constructs of the OpenMP standard, as well as possible workarounds. Performance is close to the one ob-tained with Java threads, but it requires much less programming effort, although, in certain cases, a refactoring to the original code is required.

Cited by 0

JAPE: a Java Annotation Patterns Engine

Hamish Cunningham, Hamish Cunningham, Diana Maynard et al. · 1999

Contents 1 Tokeniser 2 2 Gazetteer 3 3 Grammar 4 3.1 Use of Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Use of Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 Walkthrough example 10 4.1 Step 1 - Tokenisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Step 2 - List Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.3 Step 3 - Grammar Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 Formal Description of the JAPE Grammar 11 6 Relation to CPSL 14 7 Algorithms for JAPE Rule Application 15 7.1 The rst algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.2 Algorithm 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8 Label Binding Scheme 22 9 Classes 23 10 Implementation 23 10.1 A Walk-Through . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 10.2 Example RHS code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 11 C

Cited by 0

Annotation-Based Parallelization of Java Code

Mostafa Mehrabi, Nasser Giacaman, Oliver Sinnen · 2017

The majority of mainstream programming languages support parallel computing via extended libraries that require restructuring of sequential code. Library-based features are portable, but tend to be verbose and usually reduce the understandability and modifiability of code. On the contrary, approaches with language constructs promote simple code structures, hide the complexity of parallelization and avoid boilerplate code. However, language constructs normally impose additional development concepts and compilation requirements that may sacrifice the ease-of-use and portability. Therefore, frameworks that offer simple and intuitive concepts and constructs that are recognized by the standard compilers of a language can gain priority over other approaches. In this paper we discuss @PT (Annotation Parallel Task), a parallel programming framework that proposes Java annotations, standard Java components, as its language constructs. @PT takes an intuitive object-oriented approach on asynchronous execution of tasks, and has a special focus on GUI-responsive applications. This paper presents the annotation-based programming interface of the framework and its fundamental parallelization concepts. Furthermore, it studies @PT in different parallel programming patterns, and evaluates its efficiency by comparing @PT with other Java parallelization approaches in a set of standard benchmarks.

Cited by 3

Multiple dispatch in Java using annotation processing

Nejc Kišek · 2018

Dispatch is a mechanism in object-oriented programming languages used for distinguishing between methods with the same name and number of parameters. It works by examining the runtime types of parameters passed to a method call and selecting the most suitable method for them. Single dispatch selects a method based on the runtime type of just one of the parameters (the receiver), while the types of the rest of them are determined during compilation. Multiple dispatch determines the types of all the parameters during program execution, which is slower but more flexible. Java along with many other object-oriented languages supports single dispatch but not multiple dispatch. In such languages multiple dispatch can be simulated in different ways. The goal of this thesis was to create a library that uses annotations added to an ordinary Java program in order to generate code for simulating multiple dispatch. Because the dispatch logic is generated during compilation, it can be very complex without complicating the source code. The only change when writing a program that uses our library are additional annotations, which is much simpler than existing similar solutions that use special compilers or change the way methods can be used. There are three different versions of the library with three different mechanisms for simulating multiple dispatch: a decision tree with direct type inspection, a mechanism that uses reflection and an extended version of the visitor design pattern. The first two are similar to mechanisms used in other solutions while the third one is less known and is not found in the existing literature. In this thesis we show implementations of the three versions of our library and present the results of the experiments, where we compare them based on execution time, compilation time and size of the generated code.

Cited by 0

AnnaBot: A Static Verifier for Java Annotation Usage

Ian F. Darwin · Advances in Software Engineering · 2009

This paper describes AnnaBot, one of the first tools to verify correct use of Annotation-based metadata in the Java programming language. These Annotations are a standard Java 5 mechanism used to attach metadata to types, methods, or fields without using an external configuration file. A binary representation of the Annotation becomes part of the compiled “.class” file, for inspection by another component or library at runtime. Java Annotations were introduced into the Java language in 2004 and have become widely used in recent years due to their introduction in the Java Enterprise Edition 5, the Hibernate object-relational mapping API, the Spring Framework, and elsewhere. Despite that, mainstream development tools have not yet produced a widely-used verification tool to confirm correct configuration and placement of annotations external to the particular runtime component. While most of the examples in this paper use the Java Persistence API, AnnaBot is capable of verifying anyannotation-based API for which “claims”—description of annotation usage—are available. These claims can be written in Java or using a proposed Domain-Specific Language, which has been designed and a parser (but not the code generator) have been written.

Cited by 15Open access

Java annotation-aware just-in-time (AJIT) complilation system

Ana Azevedo, Alex Nicolau, Joe Hummel · 1999

Article Java annotation-aware just-in-time (AJIT) complilation system Share on Authors: Ana Azevedo University of California, Irvine University of California, IrvineView Profile , Alex Nicolau University of California, Irvine University of California, IrvineView Profile , Joe Hummel University of Illinois, Chicago University of Illinois, ChicagoView Profile Authors Info & Claims JAVA '99: Proceedings of the ACM 1999 conference on Java GrandeJune 1999 Pages 142–151https://doi.org/10.1145/304065.304115Online:01 June 1999Publication History 29citation671DownloadsMetricsTotal Citations29Total Downloads671Last 12 Months10Last 6 weeks1 Get Citation AlertsNew Citation Alert added!This alert has been successfully added and will be sent to:You will be notified whenever a record that you have chosen has been cited.To manage your alert preferences, click on the button below.Manage my AlertsNew Citation Alert!Please log in to your account Save to BinderSave to BinderCreate a New BinderNameCancelCreateExport CitationPublisher SiteGet Access

Cited by 40

Java Annotation-Aware Just-In-Time (AJIT) Compilation System

Ana Azevedo, Alex Nicolau, Joe Hummel · 1999

The Java Bytecodes language lacks expressiveness for traditional compiler optimizations making this portable, secure software distribution format inefficient as a program representation to produce high performance native code from. The fact that some bytecode operations intrinsically enclose implicit sub-operations (e.g., iaload, includes the address computation, array bound checks and the actual load of the array element) allied to the fact that Java Bytecodes language implements a stack model account for this inefficiency. The language has no mechanism to indicate which sub-operations in the bytecode stream are redundant or subsumed by previous ones. The stack model having no operand registers and restricting access to only the top of the stack is also a limitation as it prevents the reuse of values and bytecode reordering. As a consequence the language inhibits the expression of simple compiler transformations, such as common sub-expression elimination md loop invariant removal, and more elaborate ones as register allocation and instruction scheduling. Regardless of how optimized the bytecode stream is generated by the Java front-end, it misses ability to represent some code-improving transformations. When translating the bytecodes into native code, JIT technology has the options of directly translating the bytecodes into a poor native code or enhancing the quality of this translated code by applying code optimizations. This second alternative leads to a more time consuming translation process in the already time-constrained JIT technology. In this paper we present an alternative to an optimizing JIT compiler that makes use of code cumotations generated by the Java front-end. These annotations carry information concerning compiler optimizations. In the translation process, an annotation-aware JIT (AJIT) system can use the annotation information to produce high performance native code without performing the code analysis and sometimes the transformations necessary for cin optimizing JIT compiler. We describe the implementation of the first prototype of our annotation-generating compiler and our annotation-aware JIT system and show performance results comparing our system with other Java Virtual Machines (JVMs) running on SPARC machines.

Cited by 3

Towards Visual Modeling of Annotation by Extending Java Metamodel

Qian Li · 2007

This paper proposes a new Java metamodel with annotation extended to support annotation visual modeling. Annotation is one of the new features of Java SE5. It plays significant roles on metadata and metaprogramming. But with a view to visual modeling, annotation is not supported by either existing Java metamodel or UML2 metamodel. This causes annotation semantic features can not be reflected at higher abstract level, and annotation visual modeling is impossible. This paper presents four significant features of annotation: type-based, static instance, target-associated instance and instance immutable. Three metaclasses: AnnotatableElement, Annotation and AnnotationInstance, are extended to specify the features of annotations consistently. Further, two notions are suggested for visual modeling of annotation. The new Java metamodel complies with the MOF specification. Also it is designed simple so that it's easier to realize to support MDA and related utilities development.

Cited by 0

A Static Memory Safety Annotation System for Safety Critical Java

Daniel Tang, Ales Plsek, Kelvin Nilsen et al. · 2013

Abstract—Embedded systems must be able to operate for long periods of time with limited memory. Dynamic memory allocation is often discouraged in such systems as it requires careful analysis to rule out memory-related software defects. This paper presents an annotation system that can be used to rule out memory access errors in programs written in a subset of the Java programming language which targets safety critical applications. The annotations are optional. When present, they are used by the compiler to report, ahead of time, potential memory access errors. The proposed system is part of the upcoming Safety Critical Java Specification. It has been evaluated on a number of small benchmark programs (26 KLOC of Java code) and implemented in the oSCJ real-time Java virtual machine leading to performance improvements ranging from 1.7 % to 26%. I.

Cited by 0

DeepAnna: Deep Learning based Java Annotation Recommendation and Misuse Detection

Yi Liu, Yadong Yan, Chaofeng Sha et al. · 2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · 2022

Annotations have been widely used in Java programs to support additional compile-time, deployment-time, and runtime processing. Developers use annotations to delegate repetitive logics such as object initialization and request forwarding to compilers and runtime frameworks. Therefore, these annotations are important for the correct execution of programs. In practice, however, developers often find it hard to correctly use annotations and the misuse of annotations has led to real bugs in Java programs. In this paper, we conduct an empirical study on Stack Overflow questions to investigate the major development frameworks that are involved in questions about Java annotations and the main problems encountered by developers in the use of Java annotations. Based on the findings of the study, we propose DeepAnna, a deep learning based Java annotation recommendation and misuse detection approach. Based on a corpus of Java programs with intensive use of annotations, DeepAnna trains a deep learning based multi-label classification model by considering both the structural and textual contexts of source code. DeepAnna can recommend annotations at both class level and method level. Our evaluation with a large corpus of open-source Java projects shows that DeepAnna outperforms state-of-the-art text multi-label classification approaches in annotation recommendation and can effectively detect annotation misuses. Based on our analysis, we submit 85 bug-fixing pull requests for annotation misuses in open-source projects and 20 of them have been accepted and merged.

Cited by 5

An annotation-aware java virtual machine implementation. Concurrency - Practice and Experience

Ana Azevedo, Alex Nicolau, Joe Hummel · 2008

The Java bytecode language lacks expressiveness for traditional compiler optimizations, making this portable, secure software distribution format ine cient as a program representation for high performance. This ine ciency results from the underlying stack model, as well as the fact that many bytecode oper-ations intrinsically include sub-operations (e.g., iaload includes the address computation, array bounds checks and the actual load of the array element). The stack model, with no operand registers and limiting access to the top of the stack, prevents the reuse of values and bytecode reordering. In addition, the language has no mechanism to indicate which sub-operations in the Java bytecode stream are redundant or subsumed by previous ones. As a consequence, the Java bytecode language inhibits the expression of important compiler optimizations, including register allocation and instruction scheduling. The Java bytecode stream generated by aJava bytecode compiler is a signi cantly under-optimized program representation. The most common solution to overcome this ine ciency is the use of a Just-in-Time (JIT) compiler to not only generate native code, but perform optimization as well. However, the latter is a time consuming operation in an already time-constrained translation process. In this paper we present an alternative to an optimizing JIT compiler that makes use of code annotations generated by aJava bytecode compiler. These annotations carry information concerning compiler optimizations. During the translation process, an annotation-aware Java Virtual Machine (JVM) system then uses this information to produce high performance native code without performing much of the necessary analyses or transformations. We describe the implementation of a prototype of an annotation-aware JVM consisting of an annotation-aware JIT compilation system. We conclude the paper showing performance results comparing our system with other JVMs running on SPARC architecture. 1

Cited by 0

A novel implementation of observer pattern by aspect based on Java annotation

Jicheng Liu, Hui Yin, Yabo Wang · 2010

In the implementation of Observer pattern by OOP, the subject objects and the observer objects must implement an interface or extend an abstract class to indicate their roles. When the pattern is implemented by AOP, there is not such a requirement. The participants and their relations are defined in an aspect, it isn't necessary for these participants to implement an interface or extending an abstract class. But users are required to know an aspect language to use this method. This paper provides a novel method to implement this pattern; participant objects and their relations are defined by Java annotations. On the basis of analyzing Observer pattern implemented by AOP, the paper discusses how to define annotations to annotate participant classes and define their relations, how to establish the association between the subject and the observer is discussed in details. After analyzing classes annotated, the aspect is generated, then compiling and weaving this aspect with the target classes is done. So users may use Aspect implementation by Java annotation.

Cited by 10