Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28262] Android: Hyperloop does not expose super class' static methods/fields to subclass

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, class, hyperloop, static
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-12-01T17:39:31.000+0000
Updated2021-02-22T18:33:08.000+0000

Description

*Summary:* Hyperloop's generated JS code for a Java subclass does not expose its Java super class' public static methods and static constants. Only the instance methods/fields are exposed to the subclass. This is needed to avoid issues, such as with Google's "SnackBar" shown below. https://github.com/appcelerator/hyperloop-examples/commit/00f4c1d20747ee5adfacbf2d0cb26dba644c8a43 *Note:* If the subclass has a static method/field of the same name as it's super class, then the subclass' method/field should take priority. This is legal in Java and is known as "shadowing". *Work-Around:* You must access the super class' static methods/fields directly from the super class itself.

Comments

No comments

JSON Source