群发词典
首页
查询
CONSTRUCTOR
英音[ kənˈstrʌktə(r) ]
美音[ kənˈstrʌktər ]
构造函数
常用释义
n.
构造函数;构造器;建造者
扩展信息
变形
复数
constructors
例句
全部
The
constructor
function
has
no
parameters
and
returns
an
instance
of
the
type
with
all
of its
attributes
set
to
null
values
.
构造
函数
没有
参数
,
并且
返回
的
类型
实例
中
的
所有
属性
都
为
空
。
Constructor
,
where
the
name
of
each
value
is
converted
to
a
string
,
and
the
ordinal
setting
represents
a
one-up
value
for
each
setting
.
构造
函数
中
,
在
这里
,
每个
值
的
名称
都被
转换
成
一个
字符串
,
并且
序数
设置
表示
了
每个
设置
的
优先
值
。
This
version
of
the
constructor
allows
you
to
specify
the
group
to which an
item
belongs
.
此
版本
的
构造
函数
允许
您
指定
项
所属
的
组
。
The
*
at
the
end
of
the
CONSTRUCTOR
production
signifies
that
there
can
be zero or more occurrences of that
production
.
CONSTRUCTOR
产品
尾部
的
*
意味
着
该
产品
可以
不
存在
,
也
可以
存在
更多
。
Unlike
destructors
,
it is
often
the case that
something
done
inside
a
constructor
might
throw
an
exception
.
与
析
构
函数
不同
,
构造
函数
内部
所
做
的
事情
经常
会
抛出
异常
。
The
best
way
to
make
sure
this
doesn't
happen
is
to initialize
variables
where you
declare
them
instead
of
in
the body of
every
constructor
.
确保
这些
不会
发生
的
最好
的
方法
是
在
声明
变量
的
时候
就
初始
化
,
而不是
在
每个
构造
函数
中
进行
初始
化
。
The
programming
language
compiler
added
a
default
static
constructor
to
your
type
and
did
not
make
it
private
.
编程
语言
编译
器
已
向
您
的
类型
中
添加
默认
静态
构造
函数
,
但
未
将
其
设置
为
私有
。
Notice
that
this
constructor
takes
the $idsadmin
object
as
a
parameter
and
stores
it
in
its
own
$idsadmin
class
variable
.
注意
,
这个
构造
函数
使用
$idsadmin
对象
作为
参数
并
将
它
保存
在
自己
的
$idsadmin
类
变量
中
。
This
constructor
returns
a
value
,
however
,
which
means
that
this
value
takes
the
place
of
the
regular
Object
, which itself
is
thrown
away
.
但是
,
这个
构造
函数
返回
一个
值
,
这
意味
着
这个
值
取代
常规
的
Object
,
而后者
将
被
抛弃
。
Any
constructors that you
define
for
structures
must
have
at least
one
argument
so
that they do
not
conflict
with
the
default
constructor
.
为
结构
定义
的
任何
构造
函数
都
必须
至少
有
一个
参数
,
以便
不会
与
默认
构造
函数
冲突
。
A
static
constructor
is
used
to
initialize
any
static
data
,
or
to
perform
a
particular
action
that needs to
be
performed
once
only
.
静态
建构
函
式
可以
用来
初始
化
任何
静态
资料
,
或
执行
只需
执行
一次
的
特定
动作
。
You
defined
a
static
constructor
for
your
type
and
did
not
make
it
private
.
您
定义
了
类型
的
静态
构造
函数
,
但
未
将
其
设置
为
私有
。
Which
passes
the
name
of
the
file
containing
the
public key
as
a
parameter
to
its
constructor
.
它
将
包含
公钥
的
文件
的
名称
作为
参数
传递
至
其
构造
函数
。
This
constructor
allows
you to
specify
the
local
IP
address
and
port
number on which to
listen
for
incoming
connection
attempts
.
此
构造
函数
允许
指定
本地
IP
地址
和
用于
侦听
传入
的
连接
尝试
的
端口号
。
A
constructor
is
just
a
special
method
that
creates
an
instance
(
or
object
)
of
a
particular
class
.
构造
函数
只是
创建
特定
类
实例
(
或
对象
)
的
特殊
方法
。
The
caller
of
this
constructor
is
required
to
ensure
that
this
string
has
been
localized
for
the
current
system
culture
.
此
构造
函数
的
调用
方
需要
确保
此
字符串
已
针对
当前
系统
区域性
进行
了
本地化
。
Property
gets
a
value
indicating
whether
the
field
can
only
be
set
in
the
body
of
the
constructor
.
属性
获取
一个
值
,
该
值
指示
此
字段
是否
只能
在
构造
函数
的
主体
中
设置
。
The
class
itself
provides
no
benefits
:
it
has no
fields
,
no
constructor
(
besides
the
autogenerated
one from
Java
)
, and no
state
.
类
本身
不
提供
任何
效益
:
它
没有
字段
,
没有
构造
函数
(
除了
Java
自动
生成
的
),
没有
状态
。
Constructor
provides
the
name
for
the
Class
and
initializes
the
properties
which can be different in
every
instance
of
the
Class
.
构造
器
会
为
类
提供
一个
名称
,
和
初始
化
每
一
个
类
的
实现
的
属性
。
The
user
has
no
control
over
when
the
static
constructor
is
called
.
用户
不能
控制
何时
调用
该
静态
构造
函数
。
Thus
,
by
declaring
the variables with
this
type
,
you can directly
assign
the result
of
a
constructor
call
to the corresponding
variable
.
这样
,
通过
声明
这种
类型
的
变量
,
可以
直接
把
构造
函数
调用
的
结果
分配
给
对应
的
变量
。
To
maintain
better
performance
,
do
not
set
the
size
of a
control
in
its
constructor
.
若要
保持
更好
的
性能
,
请
不要
在
控件
构造
函数
中
设置
控件
的
大小
。
In the case
of
the
code
I
've been
using
for
this
article
,
there
's
a
major
error
in
the
interaction
between
the
two
loops
in the
constructor
.
对于
我
在
本文
中用
到
的
代码
,
构造
函数
中
两个
循环
之间
的
相互作用
中
存在
一个
重大
错误
。
Traits don't
support
auxiliary
constructors, nor
do
they accept an
argument
list for
the
primary
constructor
,
the
body
of
a trait
.
Traits
不
支持
辅助
构造
函数
,
它们
也
不
支持
在
主
构造
函数
,
trait
的
主体
里
的
参数
列表
。
An
empty
public
constructor
serves
no
purpose
.
Such
a
constructor
need
not
be
defined
at
all
.
一个
空
的
公有
构造
体
没有
用处
,
这样
一个
构造
体
完全
不
需要
被
定义
。
Control
automatically
calls
the default
constructor
of a
business
object
to
create
and
instance
of it using
reflection
.
控件
自动
调用
业务
对象
的
默认
构造
函数
,
以
使用
反射
创建
该
对象
的
实例
。
Upon
insertion
of the highlighted
record
in
table
"
wells
"
, the insert
trigger
calls
the
point
constructor
and the
transform
function
.
在
“
wells
”
表
中
插入
突出
显示
的
记录
时
,
插入
触发器
调用
点
构造
函数
和
转换
函数
。
This
shouldn't come as a
surprise
since
the
name
of
the
constructor
function
is
effectively
the
name
of the
class
.
这
不
应当
让
人
感到吃惊
,
因为
构造
函数
的
名称
实际上
是
类
的
名称
。
Constructor
is
called for that culture
,
and the
creation
process
is
time
consuming
.
构造
函数
时
创建
,
创建
过程
非常
耗时
。
This
behavior
is
referred
to
in
the
DI
world
as
constructor
injection
,
because
the
instance
is
passed
through
one
of
the
constructors
.
这个
行为
在
DI
世界
中
称作
构造
函数
注入
,
因为
实例
是
通过
一个
构造
函数
传递
的
。
同根词(词根construct)
constructive
adj
建设性的;推定的;构造上的;有助益的
constructible
adj
[数] 可构成的
constructively
adv
建设性地
construction
n
建设;建筑物;解释;造句
construct
n
构想,概念
constructivism
n
构成主义;构成派
constructivist
n
构成主义者
constructiveness
n
建造性
更新时间:2025-05-23 09:43