what is this SearchMatchPurose class does at ConvertConstantsToEnumRefactoring class

6 views
Skip to first unread message

Md Arefin

unread,
Jun 23, 2015, 10:48:31 AM6/23/15
to convert-consta...@googlegroups.com


//What rule the SearchMatchPurpose class has in converting Enum 


package edu.ohio_state.khatchad.refactoring;


public class ConvertConstantsToEnumRefactoring extends Refactoring {


static class SearchMatchPurpose {

public static final SearchMatchPurpose ALTER_INFIX_EXPRESSION = new SearchMatchPurpose();

public static final SearchMatchPurpose ALTER_NAMESPACE_PREFIX = new SearchMatchPurpose();

public static final SearchMatchPurpose ALTER_TYPE_DECLARATION = new SearchMatchPurpose();


private SearchMatchPurpose() {

}

}


Raffi Takvor Khatchadourian

unread,
Jun 23, 2015, 10:52:51 AM6/23/15
to convert-consta...@googlegroups.com
Eclipse has a built-in search engine that searches through Java code. In fact, you can access it via the UI from the “Search” menu and perform a “Java” search. With SearchMatchPurpose, we are simply recording the reason we are searching for particular elements. SearchMatchPurpose is just a singleton class (kind of like an enum but since we can’t use enums in JDK 1.4, we used this pattern). The three reasons of why we search for other Java elements in the project correspond to the constants. 

--
You received this message because you are subscribed to the Google Groups "Convert Constants to Enum Development Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to convert-constants-to...@googlegroups.com.
To post to this group, send email to convert-consta...@googlegroups.com.
Visit this group at http://groups.google.com/group/convert-constants-to-enum-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages