THE Java™ Programming Language, Fourth Edition
18.1. Package Naming A package name should prevent collisions with other packages, so choosing a name that's both meaningful and ...
The name used with an import statement must be the canonical name of a package (for import on demand) or type (for single type i ...
Import only attr.Attributed or attr.*, use the simple name Attributed for attr.Attributed, and use the full name of lingua.Attri ...
The following contrived example should make this clearer. Suppose we have a class AbstractBase declared in package P1: package P ...
override that in AbstractBase, so it is AbstractBase.pac that show invokes. Both the pro and pub methods are accessible in Concr ...
Here the method Concrete3.pac appears to have overridden the inaccessible AbstractBase.pac. In fact, Concrete3.pac overrides Con ...
So how do you actually annotate a package? There is no required way to deal with this "single annotated package statement" rule. ...
Returns the name of the vendor that owns and maintains the specification that this package implements, or null if the vendor is ...
Returns true if the package is sealed with respect to the given URL, that is, classes in the package can be loaded from the URL. ...
produced separately, although they can be cross-referenced by the doc comment, as you will soon see.[1] [1] This distinction is ...
19.2. Tags Doc comments can contain tags that hold particular kinds of information. Tags come in two forms: Block tags define st ...
The next @see form directs readers to a specific package: com.magic.attr. The final two forms allow you to reference other docum ...
Usually, though, type parameters don't require explicit documentation since their meaning is obvious. 19.2.4. @return The @retur ...
warning if it sees the @Deprecated annotation. You should always use the two together: Use the @deprecated tag to document the r ...
19.2.11. {@value} The {@valuestatic-field-name} tag is replaced by the actual value of the specified constant static field. This ...
19.2.13. {@inheritDoc} The {@inheritDoc} tag copies a documentation comment from the supertype. This is discussed in the next se ...
The {@inheritDoc} tag allows you to easily add new documentation before or after the inherited documentation, but its effectiven ...
@throws IllegalArgumentException {@inheritDoc} The onus is still on you to remember that unchecked exceptions must be manually d ...
value = newValue; return oldVal; } /** Returns a string of the form name=value. */ public String toString() { return name + "=' ...
[View full size image] ...
«
15
16
17
18
19
20
21
22
23
24
»
Free download pdf