public class Entity
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(java.lang.String graph,
java.lang.String filename,
java.lang.String options) |
Generate a graphics file for the entity
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
freetext(java.lang.String kind) |
Get the entity freetext of the given kind.
|
int |
hashCode() |
|
java.lang.String[] |
ib(java.lang.String options) |
Return the Info Browser information for an entity.
|
int |
id() |
Return a unique numeric identifier for the entity.
|
Kind |
kind() |
Get a kind object representing the kind of the entity.
|
java.lang.String |
language() |
Get the entity library text.
|
java.lang.String |
library() |
Get the entity library text.
|
java.lang.String |
longname(boolean preserveNamedRoots) |
If there is no long name defined, name() is returned.
|
java.lang.Number |
metric(java.lang.String name) |
Return the value of a metric for an entity.
|
java.util.Map<java.lang.String,java.lang.Number> |
metric(java.lang.String[] names) |
Return the values for an array of metric names as a map from name to value.
|
java.lang.String[] |
metrics() |
Return a list of metric names available for the entity.
|
java.lang.String |
name() |
Return the shortname for an entity.
|
java.lang.String |
parameters() |
Get the entity library text.
|
Reference[] |
refs(java.lang.String refkindstring,
java.lang.String entkindstring,
boolean unique) |
Return the references for this entity.
|
java.lang.String |
simplename() |
Return the simple name of the entity.
|
java.lang.String |
type() |
Get the entity type text.
|
java.lang.String |
uniquename() |
Retrieve the unique name of an entity.
|
java.lang.String |
value() |
Get the entity library text.
|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int id()
public java.lang.String name()
public java.lang.String uniquename()
public java.lang.String simplename()
public java.lang.String longname(boolean preserveNamedRoots)
For file entities, if preservedNameRoots is true, if a long filename includes a named root, it is preserved; otherwise, the named root is expanded to return the absolute filename.
preserveNamedRoots - true if named roots should be kept.public Reference[] refs(java.lang.String refkindstring, java.lang.String entkindstring, boolean unique)
refkindstring - A language-specific reference filter string. If null, references are not filtered.entkindstring - A language-specific entity filter string the referenced entities. If null, references are not filtered.unique - If true, return only the first matching reference to each unique entity.public Kind kind()
public java.lang.String[] metrics()
public java.lang.Number metric(java.lang.String name)
name - The name of the metric. Must be a valid metric name, and not null.public java.util.Map<java.lang.String,java.lang.Number> metric(java.lang.String[] names)
names - The names of metrics to retrieve values forpublic void draw(java.lang.String graph,
java.lang.String filename,
java.lang.String options)
throws UnderstandException
graph - The name of the graph to
generate. Available graphs vary by language and entity, but the name
will be the same as the name in the Understand GUI. Some examples are: filename - The name of the file.
Only jpg, png, vdx, and svg file formats are supported on all platforms,
so the filename parameter must end with either the extension .jpg,
.png, .vdx or .svg.options - Specifies the parameters used to
generate the graphics. This may be null. The format of the options string is
"name=value". Multiple options are separated with a semicolon.
spaces are allowed and are significant between mutli-word field names,
whereas, case is not significant. The valid names and values are the
same as appear in that graphs right click menu and vary by view. They
may be abbreviated to any unique prefix of their full names. Some
examples are: UnderstandException - If an error occurs. Some possible errors are: public java.lang.String[] ib(java.lang.String options)
options - This parameter may be null. If given, it specifies
parameters used to create the text. The format of the options string
is "name=value" or "{field-name}name=value". Multiple options are
separated with a semicolon. Spaces are allowed and are significant
between multi-word field names, whereas, case is not significant. An
option that specifies a field name is specific to that named field of
the Info Browser. The available field names are exactly as they appear
in the Info Browser. When a field is nested within another field, the
correct name is the two names combined. For example, in C++, the field
Macros within the field Local would be specified as "Local Macros".A field and its subfields may be disabled by specifying levels=0, or by specifying the field off, without specifying any option. For example, either of the will disable and hide the Metrics field:
Indent - this specifies the number of indent spaces to output for each level of a line of text. The default is 2.
The following options are currently available only with a field name. Not all options are available for all field names. The options that are available are the same as are displayed when right-clicking on the field name in the Understand tool. No defaults are given for these options, as the defaults are specific for each language and each field name.
"{Metrics}=off;{calls}levels=-1;{callbys}levels=-1;"
public java.lang.String type()
public java.lang.String library()
public java.lang.String value()
public java.lang.String language()
public java.lang.String parameters()
public java.lang.String freetext(java.lang.String kind)
kind - name of the freetext kind