1
public class VideoFragment extends Fragment implements CacheListener {
       ...
 public static Fragment build(String url, String cachePath) {
        return VideoFragment_.builder()
                .url(url)
                .cachePath(cachePath)
                .build();
    }
      ...
}

I searched a lot, but still have no idea about "VideoFragment_"? Can someone give me some main points?

Aladin Lee
  • 51
  • 1
  • 7
  • In fact, I'm studying [this android project](https://github.com/danikula/AndroidVideoCache/blob/master/sample/src/main/java/com/danikula/videocache/sample/VideoFragment.java) in github – Aladin Lee Dec 21 '15 at 13:00
  • Huh, [Today I Learned](http://stackoverflow.com/a/9379553/1790644). Voting to close as duplicate. – Matt Clark Dec 21 '15 at 16:47
  • Possible duplicate of [What does an underscore concatenated to a class name mean?](http://stackoverflow.com/questions/9379536/what-does-an-underscore-concatenated-to-a-class-name-mean) – Matt Clark Dec 21 '15 at 16:48
  • Before I post my question, I've read these above questions; but they are very different. People cannot solver problem by reference them. Different contexts and different answer. laalto gave a great answer. – Aladin Lee Dec 22 '15 at 14:17

1 Answers1

4

Underscore has no special meaning in Java or in Android. It's just a part of the name.

You'll need to ask the original author of the code what was the intent of such naming.


From comments:

In fact, I'm studying this android project in github

This is relevant information to the question. The project is using android-annotations enhanced fragments where:

AndroidAnnotations will generate a fragment subclass with a trailing underscore, e.g. MyFragment_. You should use the generated subclass in your xml layouts and when creating new instance fragments

so it's a feature of the annotation processor.

laalto
  • 150,114
  • 66
  • 286
  • 303