It has been learned that name slab allows for object-personal variables and methods such as the following: This code is at least Scala 2.10 Is valid and produces what I expect (unrelated to Java): Update: My goal is to use this approach to map the Hibernate data model with scala classes. Since there is no easy way to support the Hibernate Scala compilation, I want to map a Java archive to a private area, which is then wrapped in a self-titled accessor method in a slab archive. The important requirement is to keep the method and the method with the same name because I also want to preserve the logical Hibernate compilation name, e.g. To referencing it in HQL These collisions are completely normal, but keep in mind that reading your code can be a problem because These should show the collisions (if you need it) in other cases only for gates / sets, please use clear method names such as: This thread may also be useful and this
public class exam {Private int x; Public string x () {return BoxesRunTime.boxToInteger (x) .toString (); } Public examination () {x = 1; The problem is that I am not sure that I can count on this behavior later in Scala releases because I could not find any official evidence in the specifications of this behavior. . by design. So, can anyone tell me a source of such knowledge?
def xAsString ():
No comments:
Post a Comment