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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Don't get me started about those stupid light bulbs.
 
subject: Refactoring validations
 
Similar Threads
Reg Hashcodes
static print method that accepts an object
inheritance with static print method
comparing two objects by overriding equals and hashCode
comparing an element in one array with all the elements in another array