开发者

Google App Engine Java: Where is the source code of "CompiledCursor"?

开发者 https://www.devze.com 2023-03-22 19:25 出处:网络
I know that the source code for GAE\'s client lib is here. Looking at the below page: http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/datastore/Cur

I know that the source code for GAE's client lib is here.

Looking at the below page:

http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/datastore/Cursor.java

.. I see this import on line 6:

import com.google.apphosting.api.DatastorePb.CompiledCursor;

Now, where is that class defin开发者_如何转开发ed at? Searched the SVN, didn't find anything. I'm looking for its source code (in Java) in order to understand several internal things.

By the way - what "Pb" stands for? See this a lot in GAE's code.

THANK YOU!


This class isn't (currently) part of the released sources. This isn't because it needs to be hyper-secret or anytihng - it just includes internal implementation details that we haven't abstracted out for public release. Since it's an undocumented, internal implementation detail, it's probably not a high priority to clean it up and release the source. In this case (and to answer your other question), it's a compiled Protocol Buffer, so you wouldn't find the source particularly instructive anyway - it's machine generated.


I don't think that class is part of the public API. As you can see, the package name of DatastorePb (com.google.apphosting.api) differs from the API package: com.google.appengine.api.

The class is in fact not even listed in the JavaDocs for the package: http://code.google.com/appengine/docs/java/javadoc/com/google/apphosting/api/package-summary.html, so I'd say the sources aren't public.

However, with Java being based on bytecode, it is possible to decompile the .class file (observe that this may be illegal in some countries. If I recall correctly, it is allowed in the US at least in situations like these).

The class can be found in the GAE SDK, under sdk base/lib/user/appengine-api-1.0-sdk-version.jar/com/google/apphosting/api/

0

精彩评论

暂无评论...
验证码 换一张
取 消