包含有关系统对象的系统信息。
$SYSTEM
$SY
$SYSTEM.class.method()
$SYSTEM
既可以作为特殊变量调用,也可以作为调用返回系统信息的方法的类调用。
$SYSTEM
特殊变量$SYSTEM
作为特殊变量,包含本地系统名称和Caché当前实例的名称,以冒号(:
)分隔。机器的名称遵循本地操作系统的大小写约定,并且实例的名称为大写。如果Caché是实例名称的一部分,则最后一个字母没有重音。例如:
DHC-APP>WRITE $SYSTEM,!
LAPTOP-ARLL3DSO:CACHE
还可以使用LocalHostName()
方法确定本地系统名称:
DHC-APP>WRITE $SYSTEM.INetInfo.LocalHostName()
LAPTOP-ARLL3DSO
缩写$SY
只能作为特殊变量用于$SYSTEM
。
$System
作为一个类提供对各种系统对象的访问。可以调用返回信息的方法,或者调用执行某些操作(如升级或加载)并返回状态信息的方法。Caché支持多种类型的系统对象,包括:
请注意,对象类名称和方法名称区分大小写。为这些名称指定错误的大小写会导致<class is not exist>
或<method is not exist>
错误。如果不在方法名中指定圆括号,则会发出<SYNTAX>
错误。
可以使用点语法访问$system方法和属性,如以下等效语法示例所示:
DHC-APP>WRITE ##class(%SYSTEM.INetInfo).LocalHostName()
LAPTOP-ARLL3DSO
DHC-APP>WRITE $SYSTEM.INetInfo.LocalHostName()
LAPTOP-ARLL3DSO
$SYSTEM
可以访问%System
类包中的系统API类.请注意,在##class
语法中,%System
类包名称区分大小写。在$SYSTEM
语法中,$SYSTEM
关键字不区分大小写。
这些参数可用于控制将外部源导入Caché、编译现有应用程序以及将它们导出到外部目的地。在%SYSTEM
的类文档中。OBJ,这些通常作为参数qspec的值提供。每个的可用设置可以通过以下命令显示:
DHC-APP> DO $SYSTEM.OBJ.ShowFlags()
b - Include sub classes.
c - Compile. Compile the class definition(s) after loading.
d - Display. This flag is set by default.
e - Delete extent.
h - Generate help.
i - Validate XML export format against schema on Load.
k - Keep source. When this flag is set, source code of
generated routines will be kept.
l - Lock classes while compiling. This flag is set by default.
p - Percent. Include classes with names of the form %*.
r - Recursive. Compile all the classes that are dependency predecessors.
s - Process system messages or application messages.
u - Update only. Skip compilation of classes that are already up-to-date.
y - Include classes that are related to the current class in the way that
they either reference to or are referenced by the current class in SQL usage.
These flags are deprecated a, f, g, o, q, v
Default flags for this namespace =dil
You may change the default flags with the SetFlags(flags,system) classmethod.
和
DHC-APP> DO $SYSTEM.OBJ.ShowQualifiers()
Name: /autoinclude
Description: Automatically include any classes that are not up to date required to compile this class
Type: logical
Default Value: 1
Name: /autoload
Description: In UnitTest, specifies the directory to be auto-loaded.
Type: string
Name: /checkschema
Description: Validate imported XML files against the schema definition.
Type: logical
Flag: i
Default Value: 1
Name: /checksysutd
Description: Check system classes for up-to-dateness
Type: logical
Default Value: 0
Name: /checkuptodate
Description: Skip classes or expanded classes that are up-to-date.
Type: enum
Enum List: none,all,expandedonly,0,1
Default Value: expandedonly
Present Value: all
Negated Value: none
Name: /cleanup
Description: In UnitTest, if true the unit test will cleanup new globals when it finishes.
Type: logical
Default Value: 0
Name: /compile
Description: Causes classes loaded to be compiled as well.
Type: logical
Flag: c
Default Value: 0
Name: /createdirs
Description: In Export, determines if to create directories if they do not exist
Type: logical
Default Value: 0
Name: /cspcompileclass
Description: Causes classes created by CSP or CSR load to be compiled. Only effects the CSP/CSR load and not subsequent class compiles.
Type: logical
Default Value: 1
Name: /cspdeployclass
Description: When CSP page loaded deploy the class generated
Type: logical
Default Value: 0
Name: /csphidden
Description: Classes generated from CSP and CSR compilation are marked as hidden.
Type: logical
Default Value: 1
Name: /debug
Description: In UnitTest, /debug causes the Asserts to BREAK if they fail.
Type: logical
Default Value: 0
Name: /defaultowner
Description: When loading classes if the class owner keyword is not defined set the owner to this user, if $username then set it to the current user
Type: string
Name: /defines
Description: Comma separated list of macros to define and optionally their values.
Type: string
Name: /delete
Description: In UnitTest, determines if loaded classes should be deleted.
Type: logical
Default Value: 1
Name: /deleteextent
Description: Delete extent.
Type: logical
Flag: e
Default Value: 0
Name: /detail
Description: Show detailed information.
Type: logical
Default Value: 0
Name: /diffexport
Description: Do not include time modified or platform information in export so the files can be run through diff/merge tools.
Type: logical
Default Value: 0
Name: /display
Description: Alias qualifier for /displaylog and displayerror.
Type: alias
Enum List: error,log
Alias List: displayerror,displaylog
Present Value: all
Negated Value: none
All Value: all
None Value: none
Name: /displayerror
Description: Display error information.
Type: logical
Flag: d
Default Value: 1
Name: /displaylog
Description: Display log information
Type: logical
Flag: d
Default Value: 1
Name: /documatichost
Description: In Export, determines if host that is used in JavaDoc generation
Type: string
Name: /documaticnamespace
Description: In Export, determines if namespace that is used in JavaDoc generation
Type: string
Name: /documaticport
Description: In Export, determines if port that is used in JavaDoc generation
Type: string
Name: /expand
Description: Alias qualifier for /predecessorclasses, /subclasses and /relatedclasses.
Type: alias
Enum List: predecessorclasses,subclasses,relatedclasses
Alias List: predecessorclasses,subclasses,relatedclasses
Present Value: all
Negated Value: none
All Value: all
None Value: none
Name: /exportgenerated
Description: When exporting classes also export generated classes where the class generating them is also included
Type: logical
Default Value: 0
Name: /exportselectivity
Description: Export the selectivity values stored in the storage definition for this class
Type: logical
Default Value: 1
Name: /exportversion
Description: In XML export of class the version of Cache the class will be imported into.
Type: string
Name: /filterin
Description: Alias qualifier for /application, /system and /percent.
Type: alias
Enum List: system,percent,application
Alias List: system,percent,application
Present Value: (none)
Negated Value: (none)
All Value: all
None Value: none
Name: /generated
Description: When expanding wild cards include generated items (routines/classes/etc)
Type: logical
Default Value: 1
Name: /generatemap
Description: Generate the map file.
Type: logical
Default Value: 1
Name: /generationtype
Description: In Export, determines generation mode
Type: string
Name: /genserialuid
Description: In Export, determines if to generate serialVersionUID.
Type: logical
Default Value: 1
Name: /hidden
Description: Show hidden classes.
Type: logical
Flag: h
Default Value: 0
Name: /importselectivity
Description: If 0 then do not import selectivity values from the XML file. If 1 then import the selectivity values stored in the storage definition when importing XML file. If 2 keep any existing selectivity values but if a property does not have an existing value then use the selectivity from the XML file.
Type: enum
Enum List: 0,1,2
Default Value: 2
Present Value: 2
Negated Value: 0
Name: /includesubpackages
Description: Include sub-packages.
Type: logical
Flag: r
Default Value: 1
Name: /javadoc
Description: In Export, determines if to create javadoc.
Type: logical
Default Value: 1
Name: /journal
Description: Enable journaling of a class compiler
Type: logical
Default Value: 1
Name: /keepsource
Description: Keep the source code of generated routines.
Type: logical
Flag: k
Default Value: 0
Name: /load
Description: In UnitTest, determines if classes should be loaded. If not, then only classnames are obtained from the directories.
Type: logical
Default Value: 1
Name: /lock
Description: Use LOCK command while compiling classes.
Type: logical
Flag: l
Default Value: 1
Name: /make
Description: In Export, determines if to only generate dependency or class if timestamp of last compilation is greater than timestamp of last generation
Type: logical
Default Value: 0
Name: /mapped
Description: Include classes mapped from another database
Type: logical
Default Value: 0
Name: /mergeglobal
Description: If importing a global from XML file merge the global with existing data
Type: logical
Default Value: 0
Name: /multicompile
Description: Enable use of work queue manager (optionally specify the number of workers if value >1)
Type: string
Name: /newcollections
Description: In Export, determines if to use native Java collections.
Type: logical
Default Value: 1
Name: /percent
Description: Include percent classes.
Type: logical
Flag: p
Default Value: 0
Name: /pojo
Description: In Export, determines if POJO generation mode
Type: logical
Default Value: 0
Name: /predecessorclasses
Description: Recursively include dependency predecessor classes.
Type: logical
Flag: r
Default Value: 0
Name: /primitivedatatypes
Description: In Export, determines if to use Java primitives for %Integer, %Boolean, %BigInt, %Float .
Type: logical
Default Value: 0
Name: /projectabstractstream
Description: In Export, determines if to project classes that contain methods whose arguments are abstract streams or whose return type is an abstract stream.
Type: logical
Default Value: 0
Name: /projectbyrefmethodstopojo
Description: In Export, determines if to project byref methods to pojo implementation.
Type: logical
Default Value: 0
Name: /recursive
Description: Determines if Export classes recursively, or if UnitTest tests in subdirectories should run recursively.
Type: logical
Flag: r
Default Value: 1
Name: /relatedclasses
Description: Recursively include related classes.
Type: logical
Flag: y
Default Value: 0
Name: /run
Description: In UnitTest, determines if tests should run
Type: logical
Default Value: 1
Name: /skipstorage
Description: In class Export, if true do not export storage definition.
Type: logical
Default Value: 0
Name: /subclasses
Description: Recursively include sub-classes.
Type: logical
Flag: b
Default Value: 0
Name: /system
Description: Process system messages or application messages.
Type: logical
Flag: s
Default Value: 0
Name: /unconditionallyproject
Description: In Export, determines if to project regardless of problems that may prevent code from compiling or working correctly.
Type: logical
Default Value: 0
Name: /unicode
Description: Export UNICODE files.
Type: logical
Flag: n
Default Value: 0
Name: /usedeepestbase
Description: In Export, determines if to use deepest base in which method or property is defined for method or property definition. If P is defined in A,B, and C and A extends B extends C then C is a deeper base for P.
Type: logical
Default Value: 0
No Default Qualifiers at system level are set.
No Default Qualifiers for namespaces are set
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。