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.

Cannot traverse supertypes when extending "_" class  #278

@vahidg

Description

@vahidg

In an Android project, when an activity extends an AA-generated "_" class, AA cannot correctly traverse the complete supertypes line, causing problems in certain cases.

Example:

@EActivity(R.layout.hello_world)
public class HelloWorldActivity extends BaseActivity_ 

Where BaseActivity_ has been generated by AA from BaseActivity.

The Javadoc of AnnotationHelper.isSubtype mentions this issue. Basically the problem is that the generated "_" sources don't exist yet at the time we want to traverse the supertypes, cutting off the traversal.

This limitation is an issue for SherlockHelper.usesSherlock where determining the correct supertype of a given activity is vital in generating the correct source. The attempt of AnnotationHelper.isSubtype is unfortunately not good enough for the specific case of SherlockHelper.usesSherlock, where a definite supertype must be determined.

The solutions to this problem are either generating the sources in rounds to make sure that needed generated classes are existent (from aforementioned Javadoc), or somehow skipping BaseActivity_ in the example above to continue the traversal from BaseActivity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions