简体   繁体   English

我可以在制作课程后将课程组织到文件夹中,它们仍可以使用吗?

[英]Can I organize classes into folders after making them and they will still work?

For Example, i just have a bunch of classes sitting out there for my game. 例如,我只有一堆课程坐在那里为我的游戏。 Some are drawable, nondrawable, animated sprites, and more. 有些是可绘制的,不可绘制的,动画精灵等等。

I just want to know if I right-click my package and add a folder.. drop some classes into it, will it disable my program? 我只是想知道我是否右键单击我的包并添加一个文件夹..将一些类放入其中,它会禁用我的程序吗? I know in XNA it worked like that because you had to give the path. 我知道在XNA中它的工作原理是因为你必须给出路径。 I am unsure in android. 我在android中不确定。

Thanks guys and GALS 谢谢你们和GALS

*Edit (included GALS) *编辑(包括GALS)

No, adding folders and new classes will not affect your program (unless you're doing some processing that depends on your class hierarchy structure staying constant, which is not very common). 不,添加文件夹和新类不会影响您的程序(除非您正在进行某些处理,这取决于您的类层次结构保持不变,这不是很常见)。 However , if you move existing classes to different folders, you will also need to change the package statement in each source code file that you moved, as well as all references to these classes. 但是 ,如果将现有类移动到不同的文件夹,则还需要更改移动的每个源代码文件中的package语句以及对这些类的所有引用。

If you want to reorganize your class files, the refactoring capabilities in Eclipse will help you with this; 如果要重新组织类文件,Eclipse中的重构功能将帮助您完成此任务; you can move a class using the refactoring tools, and Eclipse will update all references automatically. 您可以使用重构工具移动类,Eclipse将自动更新所有引用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将大量的Stringtemplate文件组织到不同的文件夹中 - How can I organize a large number of Stringtemplate files into different folders 如何组织和减少应用程序中的课程数量 - How Can I Organize and Reduce The Amount of Classes in My Application 为生成的类添加@XmlRootElement注释后,我无法在源类中访问它们 - After adding @XmlRootElement annotation for generated classes i can't access them in my source classes 如何更好地组织框架中的类/包,以便我的应用程序的客户端可以轻松扩展它们? - How to better organize classes/packages in a framework so that the client of my application can easily extend them? 在Java EE项目中,删除类后,我无法找回它们吗? - In a Java EE project, after deleting my classes, I can't get them back? 进行排列后,如何将它们添加到数组中? [Java] - After making permutations, how do I add them to an array? [Java] 如何在Android中为Activity Java类和非Activity Java类创建单独的文件夹 - How can I create separate folders for Activity java classes and non-activity java classes in Android 我可以让布尔值在班级之间工作吗 - Can I get booleans to work between classes 如何枚举包中的所有类并将它们添加到List? - How can I enumerate all classes in a package and add them to a List? 如何在Maven jar中包含测试类并执行它们? - How can I include test classes into Maven jar and execute them?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM