[OKC JUG] update: enum-hater and the plight of unmodular static coupling
Jay Vyas
jayunit100 at gmail.com
Thu Dec 29 14:28:02 PST 2011
enum dude was right. just removed this enum from a code block,
internalized the strings into the respective objects.
Now I can replace it with a simple Class name array, and the
reflection still works fine.
*
public static enum FBRequestType {*
*
*
* USER_Extended("https://graph.facebook.com/<id>",*
* UserExtendedProfileCompletionHandler.class,*
* ChannelRequestType.FACEBOOK_USER_EXTENDED),*
*
*
* USER_FRIENDS("https://graph.facebook.com/<id>/friends",*
* FriendsCompletionHandler.class,*
* ChannelRequestType.FACEBOOK_USER_FRIENDS),*
*
*
* USER_NewsFeed("https://graph.facebook.com/<id>/feed",*
* NewsFeedPageCompletionHandler.class,*
* ChannelRequestType.FACEBOOK_USER_NEWSFEED),*
*
*
* USER_WallFeed("https://graph.facebook.com/<id>/home",*
* WallFeedPageCompletionHandler.class,*
* ChannelRequestType.FACEBOOK_USER_WALLFEED);*
*
*
* FBRequestType(String url,*
* Class<? extends AsyncCompletionHandler<Response>> handlerClass,*
* ChannelRequestType crt) {*
* this.handlerClass = handlerClass;*
* this.url = url;*
* this.chReqType = crt;*
* }*
*
*
* /***
* * This field should be used by any classes which need to access the*
* * various counters produced by the crawlers. At the time of this edit,*
* * this includes the BatchFetchter - which assembles*
* * "job generated properties" into a map which can be read, by*
* * integration tests.*
* * *
* * @return*
* */*
* public String getCounterName() {*
* return chReqType.name();*
* };*
*
*
* public ChannelRequestType chReqType;*
* public String url;*
* public Class<? extends AsyncCompletionHandler<Response>> handlerClass;*
* }*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okcjug.org/pipermail/jug-okcjug.org/attachments/20111229/6abf1db6/attachment-0002.htm>
More information about the Jug
mailing list