Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

EBean inside inner class #248

Description

@pleerock
@EBean
public class MyClass {

// ... some methods of my class ...

@EBean
static class StringResourcesOfMyClass {

@StringRes
static String myString;

@StringRes
static String myStringAnother;

}

Gives me an error like:
The package com.test.MyClass collides with a type

StringResourcesOfMyClass_.java /MyProject/.apt_generated/com/test/MyClass line 6 Java Problem

Activity

  1. pyricau commented on Jun 28, 2012

    @pyricau
    Contributor

    You are right, this is a bug.

    It won't be easy to fix though, because this occurs for all @EXXX annotations.

    We can find a fix for static inner classes by creating a subclass that isn't an inner class but lives in the same package. We have to determine a naming convention for the generated subclass of an inner class.

    By the way, I don't think we can fix this for non static inner classes, because subclasses of such classes must live in a subclass of the outer class. Still following me :-P ? This means that if StringResourcesOfMyClass wasn't static, we'd have to generate MyClass_ with StringResourcesOfMyClass_ as an inner class, at the same time. Hard to do in AndroidAnnotations architecture, I believe. So we should add a compile time error in such a case.

  2. DayS commented on Jul 23, 2014

    @DayS
    Contributor

    Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions