ASM Mirror Descriptor

Addition to OW2 ASM library to support generating descriptors and signatures from TypeMirrors/Elements

License

License

Categories

Categories

ASM Application Layer Libs Bytecode Manipulation Mirror Introspection
GroupId

GroupId

io.soabase.asm-mirror-descriptor
ArtifactId

ArtifactId

asm-mirror-descriptor-parent
Last Version

Last Version

1
Release Date

Release Date

Type

Type

pom
Description

Description

ASM Mirror Descriptor
Addition to OW2 ASM library to support generating descriptors and signatures from TypeMirrors/Elements
Project URL

Project URL

https://github.com/soabase/asm-mirror-descriptor
Project Organization

Project Organization

ASM Mirror Descriptor
Source Code Management

Source Code Management

https://github.com/soabase/asm-mirror-descriptor

Download asm-mirror-descriptor-parent

How to add to project

<!-- https://jarcasting.com/artifacts/io.soabase.asm-mirror-descriptor/asm-mirror-descriptor-parent/ -->
<dependency>
    <groupId>io.soabase.asm-mirror-descriptor</groupId>
    <artifactId>asm-mirror-descriptor-parent</artifactId>
    <version>1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/io.soabase.asm-mirror-descriptor/asm-mirror-descriptor-parent/
implementation 'io.soabase.asm-mirror-descriptor:asm-mirror-descriptor-parent:1'
// https://jarcasting.com/artifacts/io.soabase.asm-mirror-descriptor/asm-mirror-descriptor-parent/
implementation ("io.soabase.asm-mirror-descriptor:asm-mirror-descriptor-parent:1")
'io.soabase.asm-mirror-descriptor:asm-mirror-descriptor-parent:pom:1'
<dependency org="io.soabase.asm-mirror-descriptor" name="asm-mirror-descriptor-parent" rev="1">
  <artifact name="asm-mirror-descriptor-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='io.soabase.asm-mirror-descriptor', module='asm-mirror-descriptor-parent', version='1')
)
libraryDependencies += "io.soabase.asm-mirror-descriptor" % "asm-mirror-descriptor-parent" % "1"
[io.soabase.asm-mirror-descriptor/asm-mirror-descriptor-parent "1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.ow2.asm : asm jar 7.1

Project Modules

  • asm-mirror-descriptor
  • asm-mirror-descriptor-test-processor
  • asm-mirror-descriptor-test

Build Status Maven Central

ASM Mirror Descriptor

Addition to OW2 ASM library to support generating descriptors and signatures from TypeMirrors/Elements.

Background

The ASM library has classes that can process Java class files through a Visitor style API allowing users to examine or modify any part of a class. The ASM Mirror project adds comparable classes to do the same with TypeMirror and Element instances used during Annotation Processing.

Corresponding Classes

ASM Class ASM Mirror Class Description
ClassReader MirrorClassReader A parser to make a ClassVisitor visit a TypeMirror/Element instance.
Type MirrorType A Java field or method type.

Additional Classes

The Java spec requires "signatures" for generic descriptors. The ASM library has some internal utilities for generating these. The ASM mirror library provides SignatureMirrorType to generate generic signatures from TypeMirrors/Elements.

Usage

Usage is the same as for the ASM library except you pass in a TypeMirror element from an annotation processor instead of a class file. ASM Mirror calls a standard ASM ClassVistor E.g.

MirrorClassReader reader = new MirrorClassReader(processingEnv, element);
reader.accept(myClassVisitor);  // standard ASM ClassVisitor

Versions

Version
1