ridljar: javadoc & Override

Javadoc: apply formatting and remove the warning "empty <p> tag".

@Override public String toString()
@Override public boolean equals(Object obj)
@Override public int hashCode()

Change-Id: I64b63d01015535d386ac584831c4ef6e371e863d
Reviewed-on: https://gerrit.libreoffice.org/10453
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
rbuj
2014-07-22 12:33:50 +02:00
committed by Caolán McNamara
parent aff263c8b8
commit 0340e62fc9
8 changed files with 70 additions and 57 deletions

View File

@@ -28,19 +28,19 @@ package com.sun.star.uno;
* an interprocess connection using an any, you should use this class to add * an interprocess connection using an any, you should use this class to add
* an explicit interface type, so the remote counterpart doesn't need to invoke * an explicit interface type, so the remote counterpart doesn't need to invoke
* a queryInterface). * a queryInterface).
* <p> * </p>
*/ */
public class Any { public class Any {
/** /**
* The type of the any. * The type of the any.
* <p> *
* @see #getType * @see #getType
*/ */
protected Type _type; protected Type _type;
/** /**
* The data of the any. * The data of the any.
* <p> *
* @see #getObject * @see #getObject
*/ */
protected Object _object; protected Object _object;
@@ -52,7 +52,7 @@ public class Any {
/** /**
* Constructs a new any. * Constructs a new any.
* <p> *
* @param zInterface the type of the any. * @param zInterface the type of the any.
* @param object the data of the any. * @param object the data of the any.
* @deprecated as of UDK 2.0 * @deprecated as of UDK 2.0
@@ -61,9 +61,11 @@ public class Any {
this(new Type(zInterface), object); this(new Type(zInterface), object);
} }
/** Constructs a new any with a given type and value /**
@param type the UNO type of the any. * Constructs a new any with a given type and value
@param object the value of the any. *
* @param type the UNO type of the any.
* @param object the value of the any.
*/ */
public Any(Type type, Object object) { public Any(Type type, Object object) {
if (type.equals(Type.ANY)) { if (type.equals(Type.ANY)) {
@@ -74,15 +76,13 @@ public class Any {
} }
/** /**
Complete a UNO <code>ANY</code> (make sure it is wrapped up as an * Complete a UNO <code>ANY</code> (make sure it is wrapped up as an
<code>Any</code> instance). * <code>Any</code> instance).
*
@param any a Java value representing a UNO <code>ANY</code> value. * @param any a Java value representing a UNO <code>ANY</code> value.
* @return a complete Java value (that is, an <code>Any</code> instance)
@return a complete Java value (that is, an <code>Any</code> instance) * representing the same UNO <code>ANY</code> value as the given argument.
representing the same UNO <code>ANY</code> value as the given argument. * @since UDK 3.2.3
@since UDK 3.2.3
*/ */
public static final Any complete(Object any) { public static final Any complete(Object any) {
return any instanceof Any return any instanceof Any
@@ -93,8 +93,8 @@ public class Any {
/** /**
* Gets the type of the value within the any. * Gets the type of the value within the any.
* <p> *
* @return the type of the value within the any. * @return the type of the value within the any.
*/ */
public Type getType() { public Type getType() {
return _type; return _type;
@@ -102,14 +102,22 @@ public class Any {
/** /**
* Gets the value within the any. * Gets the value within the any.
* <p> *
* @return gets the value within the any. * @return gets the value within the any.
*/ */
public Object getObject() { public Object getObject() {
return _object; return _object;
} }
// @see java.lang.Object#equals /**
* Indicates whether some other object is equal to this one.
*
* @param obj the reference object with which to compare.
* @return <code>true</code> if this object is the same as the obj argument;
* <code>false</code> otherwise.
* @see java.lang.Object#equals
*/
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return obj instanceof Any && _type.equals(((Any) obj)._type) return obj instanceof Any && _type.equals(((Any) obj)._type)
&& (_object == null && (_object == null
@@ -117,13 +125,25 @@ public class Any {
: _object.equals(((Any) obj)._object)); : _object.equals(((Any) obj)._object));
} }
// @see java.lang.Object#hashCode /**
* Returns a hash code value for the object.
*
* @return a hash code value for this object.
* @see java.lang.Object#hashCode
*/
@Override
public int hashCode() { public int hashCode() {
return _type.hashCode() * 13 return _type.hashCode() * 13
+ (_object == null ? 0 : _object.hashCode()); + (_object == null ? 0 : _object.hashCode());
} }
// @see java.lang.Object#toString /**
* Returns a string representation of the object.
*
* @return a string representation of the object.
* @see java.lang.Object#toString
*/
@Override
public String toString() { public String toString() {
return "Any[" + _type + ", " + _object + "]"; return "Any[" + _type + ", " + _object + "]";
} }

View File

@@ -21,18 +21,18 @@ package com.sun.star.uno;
/** /**
* The Enum class is the base class for all classes generated * The Enum class is the base class for all classes generated
* as java binding for the IDL type enum. * as java binding for the IDL type enum.
* <p>
* Each java mapped enum class provides static member of this class * Each java mapped enum class provides static member of this class
* which represents the enum values. * which represents the enum values.
* You cannot create a object of this class or subclass direct, to * You cannot create a object of this class or subclass direct, to
* avoid enum values with integer values outside the defined range. * avoid enum values with integer values outside the defined range.
* <p> * </p>
*/ */
public abstract class Enum { public abstract class Enum {
private int m_value; private int m_value;
/** /**
* Constructs a enum value. * Constructs a enum value.
* <p>
* @param value the integer value of this enum value. * @param value the integer value of this enum value.
*/ */
protected Enum(int value) { protected Enum(int value) {
@@ -41,7 +41,6 @@ public abstract class Enum {
/** /**
* Get the integer value of an enum value. * Get the integer value of an enum value.
* <p>
* @return the integer value. * @return the integer value.
*/ */
public final int getValue() { public final int getValue() {

View File

@@ -30,28 +30,24 @@ package com.sun.star.uno;
public interface IMemberDescription { public interface IMemberDescription {
/** /**
* Gives the name of this member. * Gives the name of this member.
* <p>
* @return the name * @return the name
*/ */
String getName(); String getName();
/** /**
* Indicates if this member is unsigned. (Not useful for IMethodDescription). * Indicates if this member is unsigned. (Not useful for IMethodDescription).
* <p>
* @return the unsigned state * @return the unsigned state
*/ */
boolean isUnsigned(); boolean isUnsigned();
/** /**
* Indicates if this member is an any. * Indicates if this member is an any.
* <p>
* @return the any state * @return the any state
*/ */
boolean isAny(); boolean isAny();
/** /**
* Indicates if this member is an interface. * Indicates if this member is an interface.
* <p>
* @return the interface state * @return the interface state
*/ */
boolean isInterface(); boolean isInterface();
@@ -59,7 +55,6 @@ public interface IMemberDescription {
/** /**
* Gives the relative index of this member in the declaring * Gives the relative index of this member in the declaring
* interface or struct (including superclasses). * interface or struct (including superclasses).
* <p>
* @return the relative index of this member * @return the relative index of this member
*/ */
int getIndex(); int getIndex();

View File

@@ -34,14 +34,12 @@ public interface IMethodDescription extends IMemberDescription {
/** /**
* Indicates if this method is <code>oneWay</code>, * Indicates if this method is <code>oneWay</code>,
* respectively if this method may become executed asynchronously. * respectively if this method may become executed asynchronously.
* <p>
* @return true means may execute asynchronously . * @return true means may execute asynchronously .
*/ */
boolean isOneway(); boolean isOneway();
/** /**
* Indicates if this method is const. * Indicates if this method is const.
* <p>
* @return true means it is const. * @return true means it is const.
*/ */
boolean isConst(); boolean isConst();
@@ -49,7 +47,6 @@ public interface IMethodDescription extends IMemberDescription {
/** /**
* Gives any array of <code>ITypeDescription</code> of * Gives any array of <code>ITypeDescription</code> of
* the [in] parameters. * the [in] parameters.
* <p>
* @return the in parameters * @return the in parameters
*/ */
ITypeDescription[] getInSignature(); ITypeDescription[] getInSignature();
@@ -57,7 +54,6 @@ public interface IMethodDescription extends IMemberDescription {
/** /**
* Gives any array of <code>ITypeDescription</code> of * Gives any array of <code>ITypeDescription</code> of
* the [out] parameters. * the [out] parameters.
* <p>
* @return the out parameters * @return the out parameters
*/ */
ITypeDescription[] getOutSignature(); ITypeDescription[] getOutSignature();
@@ -65,14 +61,12 @@ public interface IMethodDescription extends IMemberDescription {
/** /**
* Gives the <code>ITypeDescription</code> of * Gives the <code>ITypeDescription</code> of
* the return type. * the return type.
* <p>
* @return the return type <code>ITypeDescription</code> * @return the return type <code>ITypeDescription</code>
*/ */
ITypeDescription getReturnSignature(); ITypeDescription getReturnSignature();
/** /**
* Gives native java method of this method. * Gives native java method of this method.
* <p>
* @return the java methodd * @return the java methodd
*/ */
Method getMethod(); Method getMethod();

View File

@@ -21,7 +21,6 @@ package com.sun.star.uno;
/** /**
* The <code>ITypeDescription</code> allows to examine a type * The <code>ITypeDescription</code> allows to examine a type
* in detail (e.g. it is used for marshaling/unmarshaling). * in detail (e.g. it is used for marshaling/unmarshaling).
*
* @deprecated This interface does not cover all the features supported by the * @deprecated This interface does not cover all the features supported by the
* corresponding (unpublished) implementation. But no client code should need * corresponding (unpublished) implementation. But no client code should need
* to access this functionality, anyway. * to access this functionality, anyway.
@@ -30,7 +29,6 @@ public interface ITypeDescription {
/** /**
* Gets the <code>ITypeDescription</code> of the * Gets the <code>ITypeDescription</code> of the
* super, if it exists. * super, if it exists.
* <p>
* @return the <code>ITypeDescription</code>. * @return the <code>ITypeDescription</code>.
*/ */
ITypeDescription getSuperType(); ITypeDescription getSuperType();
@@ -39,7 +37,6 @@ public interface ITypeDescription {
* Gets the <code>IMethodDescription</code> for every * Gets the <code>IMethodDescription</code> for every
* method, if this type is an interface. Otherwise * method, if this type is an interface. Otherwise
* returns <code>null</code>. * returns <code>null</code>.
* <p>
* @return the <code>IMethodDescription[]</code>. * @return the <code>IMethodDescription[]</code>.
*/ */
IMethodDescription []getMethodDescriptions(); IMethodDescription []getMethodDescriptions();
@@ -48,7 +45,6 @@ public interface ITypeDescription {
* Gets the <code>IMethodDescription</code> for the * Gets the <code>IMethodDescription</code> for the
* method with index methodId, if it exists, otherwise * method with index methodId, if it exists, otherwise
* returns <code>null</code>. * returns <code>null</code>.
* <p>
* @return the <code>IMethodDescription</code>. * @return the <code>IMethodDescription</code>.
*/ */
IMethodDescription getMethodDescription(int methodId); IMethodDescription getMethodDescription(int methodId);
@@ -57,7 +53,6 @@ public interface ITypeDescription {
* Gets the <code>IMethodDescription</code> for the * Gets the <code>IMethodDescription</code> for the
* method with the name <code>name</code>, if it exists, * method with the name <code>name</code>, if it exists,
* otherwise returns <code>null</code>. * otherwise returns <code>null</code>.
* <p>
* @return the <code>IMethodDescription</code>. * @return the <code>IMethodDescription</code>.
*/ */
IMethodDescription getMethodDescription(String name); IMethodDescription getMethodDescription(String name);
@@ -66,7 +61,6 @@ public interface ITypeDescription {
* Gets the <code>IFieldDescription</code> for every * Gets the <code>IFieldDescription</code> for every
* field, if this type is an interface. Otherwise * field, if this type is an interface. Otherwise
* returns <code>null</code>. * returns <code>null</code>.
* <p>
* @return the <code>IFieldDescription[]</code>. * @return the <code>IFieldDescription[]</code>.
*/ */
IFieldDescription []getFieldDescriptions(); IFieldDescription []getFieldDescriptions();
@@ -75,14 +69,12 @@ public interface ITypeDescription {
* Gets the <code>IFieldDescription</code> for the * Gets the <code>IFieldDescription</code> for the
* field with the name <code>name</code>, if it exists, * field with the name <code>name</code>, if it exists,
* otherwise returns <code>null</code>. * otherwise returns <code>null</code>.
* <p>
* @return the <code>IFieldDescription</code>. * @return the <code>IFieldDescription</code>.
*/ */
IFieldDescription getFieldDescription(String name); IFieldDescription getFieldDescription(String name);
/** /**
* Gets the IDL <code>TypeClass</code> of the type. * Gets the IDL <code>TypeClass</code> of the type.
* <p>
* @return the <code>TypeClass</code>. * @return the <code>TypeClass</code>.
*/ */
TypeClass getTypeClass(); TypeClass getTypeClass();
@@ -90,14 +82,12 @@ public interface ITypeDescription {
/** /**
* Gets the component <code>ITypeDescription</code> if * Gets the component <code>ITypeDescription</code> if
* this is an array type, otherwise returns <code>null</code>. * this is an array type, otherwise returns <code>null</code>.
* <p>
* @return the <code>ITypeDescription</code> * @return the <code>ITypeDescription</code>
*/ */
ITypeDescription getComponentType(); ITypeDescription getComponentType();
/** /**
* Gets the (UNO) type name. * Gets the (UNO) type name.
*
* <table> * <table>
* <caption>Mapping from UNO types to type names</caption> * <caption>Mapping from UNO types to type names</caption>
* <thead> * <thead>
@@ -150,14 +140,12 @@ public interface ITypeDescription {
* a simple name <var>S</var>, the corresponding type name consists of the * a simple name <var>S</var>, the corresponding type name consists of the
* same sequence of module names and simple name, with <code>"."</code> * same sequence of module names and simple name, with <code>"."</code>
* separating the individual elements.</p> * separating the individual elements.</p>
*
* @return the type name. * @return the type name.
*/ */
String getTypeName(); String getTypeName();
/** /**
* Gets the (Java) array type name. * Gets the (Java) array type name.
*
* <p>The array type name is defined to be the Java class name (as returned * <p>The array type name is defined to be the Java class name (as returned
* by <code>Class.forName</code>) of the Java array class that corresponds * by <code>Class.forName</code>) of the Java array class that corresponds
* to the UNO sequence type with this type (the UNO type represented by this * to the UNO sequence type with this type (the UNO type represented by this
@@ -165,14 +153,12 @@ public interface ITypeDescription {
* <code>ITypeDescription</code> instance representing the UNO type VOID, * <code>ITypeDescription</code> instance representing the UNO type VOID,
* the array type name is defined to be * the array type name is defined to be
* <code>"[Ljava.lang.Void;"</code>.</p> * <code>"[Ljava.lang.Void;"</code>.</p>
*
* @return the array type name. * @return the array type name.
*/ */
String getArrayTypeName(); String getArrayTypeName();
/** /**
* Gets the corresponding java class for the type. * Gets the corresponding java class for the type.
* <p>
* @return the corresponding java class. * @return the corresponding java class.
*/ */
Class<?> getZClass(); Class<?> getZClass();

View File

@@ -410,19 +410,39 @@ public class Type {
} }
} }
// @see java.lang.Object#equals /**
* Indicates whether some other object is equal to this one.
*
* @param obj the reference object with which to compare.
* @return <code>true</code> if this object is the same as the obj argument;
* <code>false</code> otherwise.
* @see java.lang.Object#equals
*/
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return obj instanceof Type return obj instanceof Type
&& _typeClass == ((Type) obj)._typeClass && _typeClass == ((Type) obj)._typeClass
&& _typeName.equals(((Type) obj)._typeName); && _typeName.equals(((Type) obj)._typeName);
} }
// @see java.lang.Object#hashCode /**
* Returns a hash code value for the object.
*
* @return a hash code value for this object.
* @see java.lang.Object#hashCode
*/
@Override
public int hashCode() { public int hashCode() {
return _typeName.hashCode(); return _typeName.hashCode();
} }
// @see java.lang.Object#toString /**
* Returns a string representation of the object.
*
* @return a string representation of the object.
* @see java.lang.Object#toString
*/
@Override
public String toString() { public String toString() {
return "Type[" + _typeName + "]"; return "Type[" + _typeName + "]";
} }

View File

@@ -26,8 +26,7 @@ package com.sun.star.uno;
public class Union { public class Union {
/** /**
* Get the value in the union. * Get the value in the union.
* The representation of the value is an any. * <p>The representation of the value is an any.</p>
* <p>
* @return the any value. * @return the any value.
*/ */
public final Object getValue() { public final Object getValue() {

View File

@@ -31,7 +31,7 @@ import com.sun.star.lib.util.WeakMap;
* *
* <p>The methods <code>queryInterface</code> and <code>areSame</code> delegate * <p>The methods <code>queryInterface</code> and <code>areSame</code> delegate
* calls to the implementing objects and are used instead of casts, * calls to the implementing objects and are used instead of casts,
* <code>instanceof</code>, <code>==</code>, and <code>equals</code>.<p> * <code>instanceof</code>, <code>==</code>, and <code>equals</code>.</p>
* *
* <p>For historic reasons, this class is not <code>final</code>, and has a * <p>For historic reasons, this class is not <code>final</code>, and has a
* <code>public</code> constructor. These artifacts are considered mistakes, * <code>public</code> constructor. These artifacts are considered mistakes,