beanproperty.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 34 行
SCALA
34 行
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */// $Id: BeanProperty.scala 10116 2007-02-27 09:52:03Z michelou $package scala.reflect/** <p> * This attribute adds a setter and a getter method, following the * Java Bean convention (first letter of the property is capitalized) * used by popular Java web frameworks. For example: * </p><pre> * @BeanProperty * <b>var</b> status = ""</pre> * <p> * adds the following methods to the <b>generated</b> code * </p><pre> * <b>def</b> setStatus(s: String) { <b>this</b>.status = s } * <b>def</b> getStatus: String = <b>this</b>.status * </pre> * <p> * However, you cannot call <code>setStatus</code> from * <a href="http://scala-lang.org/" target="_top">Scala</a>, * you should use the normal Scala access and assignment. * </p> */class BeanProperty extends Annotation
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?