aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Refactoring validations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Refactoring validations" Watch "Refactoring validations" New topic
Author

Refactoring validations

Wilker Iceri
Greenhorn

Joined: Oct 23, 2012
Posts: 1
Hello!

I have two classes for example:



I have two different objects(obj and obj2) with attribute email. Currently i use a method statis ValidatorUtil.isValidString()... for validate strings, etc.

What is the best way for encapsulate the validation? For i remove this from the login methods?

Thanks, and sorry for bad english
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refactoring validations
 
Similar Threads
Reg Hashcodes
static print method that accepts an object
comparing an element in one array with all the elements in another array
comparing two objects by overriding equals and hashCode
inheritance with static print method