diff options
author | rbuj <robert.buj@gmail.com> | 2014-07-22 12:33:50 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-22 14:10:42 +0000 |
commit | 0340e62fc9fa78cfe0a6718ac07f1ba31260ff5c (patch) | |
tree | 6bd130b9a213c41465450b46ed1015b5de07efb6 /ridljar | |
parent | aff263c8b814c6bf352312403d3c1e448c8013a3 (diff) |
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>
Diffstat (limited to 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/uno/Any.java | 66 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/Enum.java | 5 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/IMemberDescription.java | 5 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/IMethodDescription.java | 6 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/ITypeDescription.java | 14 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/Type.java | 26 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/Union.java | 3 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/UnoRuntime.java | 2 |
8 files changed, 70 insertions, 57 deletions
diff --git a/ridljar/com/sun/star/uno/Any.java b/ridljar/com/sun/star/uno/Any.java index ba1d9f643b56..8da2bfbcef00 100644 --- a/ridljar/com/sun/star/uno/Any.java +++ b/ridljar/com/sun/star/uno/Any.java @@ -28,19 +28,19 @@ package com.sun.star.uno; * 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 * a queryInterface). - * <p> + * </p> */ public class Any { /** * The type of the any. - * <p> + * * @see #getType */ protected Type _type; /** * The data of the any. - * <p> + * * @see #getObject */ protected Object _object; @@ -52,7 +52,7 @@ public class Any { /** * Constructs a new any. - * <p> + * * @param zInterface the type of the any. * @param object the data of the any. * @deprecated as of UDK 2.0 @@ -61,9 +61,11 @@ public class Any { this(new Type(zInterface), object); } - /** Constructs a new any with a given type and value - @param type the UNO type of the any. - @param object the value of the any. + /** + * Constructs a new any with a given type and value + * + * @param type the UNO type of the any. + * @param object the value of the any. */ public Any(Type type, Object object) { 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 - <code>Any</code> instance). - - @param any a Java value representing a UNO <code>ANY</code> value. - - @return a complete Java value (that is, an <code>Any</code> instance) - representing the same UNO <code>ANY</code> value as the given argument. - - @since UDK 3.2.3 + * Complete a UNO <code>ANY</code> (make sure it is wrapped up as an + * <code>Any</code> instance). + * + * @param any a Java value representing a UNO <code>ANY</code> value. + * @return a complete Java value (that is, an <code>Any</code> instance) + * representing the same UNO <code>ANY</code> value as the given argument. + * @since UDK 3.2.3 */ public static final Any complete(Object any) { return any instanceof Any @@ -93,8 +93,8 @@ public class 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() { return _type; @@ -102,14 +102,22 @@ public class 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() { 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) { return obj instanceof Any && _type.equals(((Any) obj)._type) && (_object == null @@ -117,13 +125,25 @@ public class Any { : _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() { return _type.hashCode() * 13 + (_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() { return "Any[" + _type + ", " + _object + "]"; } diff --git a/ridljar/com/sun/star/uno/Enum.java b/ridljar/com/sun/star/uno/Enum.java index 0203347adb53..53615cb87c5f 100644 --- a/ridljar/com/sun/star/uno/Enum.java +++ b/ridljar/com/sun/star/uno/Enum.java @@ -21,18 +21,18 @@ package com.sun.star.uno; /** * The Enum class is the base class for all classes generated * as java binding for the IDL type enum. + * <p> * Each java mapped enum class provides static member of this class * which represents the enum values. * You cannot create a object of this class or subclass direct, to * avoid enum values with integer values outside the defined range. - * <p> + * </p> */ public abstract class Enum { private int m_value; /** * Constructs a enum value. - * <p> * @param value the integer value of this enum value. */ protected Enum(int value) { @@ -41,7 +41,6 @@ public abstract class Enum { /** * Get the integer value of an enum value. - * <p> * @return the integer value. */ public final int getValue() { diff --git a/ridljar/com/sun/star/uno/IMemberDescription.java b/ridljar/com/sun/star/uno/IMemberDescription.java index c38094452474..605616f0d67e 100644 --- a/ridljar/com/sun/star/uno/IMemberDescription.java +++ b/ridljar/com/sun/star/uno/IMemberDescription.java @@ -30,28 +30,24 @@ package com.sun.star.uno; public interface IMemberDescription { /** * Gives the name of this member. - * <p> * @return the name */ String getName(); /** * Indicates if this member is unsigned. (Not useful for IMethodDescription). - * <p> * @return the unsigned state */ boolean isUnsigned(); /** * Indicates if this member is an any. - * <p> * @return the any state */ boolean isAny(); /** * Indicates if this member is an interface. - * <p> * @return the interface state */ boolean isInterface(); @@ -59,7 +55,6 @@ public interface IMemberDescription { /** * Gives the relative index of this member in the declaring * interface or struct (including superclasses). - * <p> * @return the relative index of this member */ int getIndex(); diff --git a/ridljar/com/sun/star/uno/IMethodDescription.java b/ridljar/com/sun/star/uno/IMethodDescription.java index f8f509e1bcd9..f58e194f2efd 100644 --- a/ridljar/com/sun/star/uno/IMethodDescription.java +++ b/ridljar/com/sun/star/uno/IMethodDescription.java @@ -34,14 +34,12 @@ public interface IMethodDescription extends IMemberDescription { /** * Indicates if this method is <code>oneWay</code>, * respectively if this method may become executed asynchronously. - * <p> * @return true means may execute asynchronously . */ boolean isOneway(); /** * Indicates if this method is const. - * <p> * @return true means it is const. */ boolean isConst(); @@ -49,7 +47,6 @@ public interface IMethodDescription extends IMemberDescription { /** * Gives any array of <code>ITypeDescription</code> of * the [in] parameters. - * <p> * @return the in parameters */ ITypeDescription[] getInSignature(); @@ -57,7 +54,6 @@ public interface IMethodDescription extends IMemberDescription { /** * Gives any array of <code>ITypeDescription</code> of * the [out] parameters. - * <p> * @return the out parameters */ ITypeDescription[] getOutSignature(); @@ -65,14 +61,12 @@ public interface IMethodDescription extends IMemberDescription { /** * Gives the <code>ITypeDescription</code> of * the return type. - * <p> * @return the return type <code>ITypeDescription</code> */ ITypeDescription getReturnSignature(); /** * Gives native java method of this method. - * <p> * @return the java methodd */ Method getMethod(); diff --git a/ridljar/com/sun/star/uno/ITypeDescription.java b/ridljar/com/sun/star/uno/ITypeDescription.java index 62a399b6a7a3..b326e9c421bc 100644 --- a/ridljar/com/sun/star/uno/ITypeDescription.java +++ b/ridljar/com/sun/star/uno/ITypeDescription.java @@ -21,7 +21,6 @@ package com.sun.star.uno; /** * The <code>ITypeDescription</code> allows to examine a type * in detail (e.g. it is used for marshaling/unmarshaling). - * * @deprecated This interface does not cover all the features supported by the * corresponding (unpublished) implementation. But no client code should need * to access this functionality, anyway. @@ -30,7 +29,6 @@ public interface ITypeDescription { /** * Gets the <code>ITypeDescription</code> of the * super, if it exists. - * <p> * @return the <code>ITypeDescription</code>. */ ITypeDescription getSuperType(); @@ -39,7 +37,6 @@ public interface ITypeDescription { * Gets the <code>IMethodDescription</code> for every * method, if this type is an interface. Otherwise * returns <code>null</code>. - * <p> * @return the <code>IMethodDescription[]</code>. */ IMethodDescription []getMethodDescriptions(); @@ -48,7 +45,6 @@ public interface ITypeDescription { * Gets the <code>IMethodDescription</code> for the * method with index methodId, if it exists, otherwise * returns <code>null</code>. - * <p> * @return the <code>IMethodDescription</code>. */ IMethodDescription getMethodDescription(int methodId); @@ -57,7 +53,6 @@ public interface ITypeDescription { * Gets the <code>IMethodDescription</code> for the * method with the name <code>name</code>, if it exists, * otherwise returns <code>null</code>. - * <p> * @return the <code>IMethodDescription</code>. */ IMethodDescription getMethodDescription(String name); @@ -66,7 +61,6 @@ public interface ITypeDescription { * Gets the <code>IFieldDescription</code> for every * field, if this type is an interface. Otherwise * returns <code>null</code>. - * <p> * @return the <code>IFieldDescription[]</code>. */ IFieldDescription []getFieldDescriptions(); @@ -75,14 +69,12 @@ public interface ITypeDescription { * Gets the <code>IFieldDescription</code> for the * field with the name <code>name</code>, if it exists, * otherwise returns <code>null</code>. - * <p> * @return the <code>IFieldDescription</code>. */ IFieldDescription getFieldDescription(String name); /** * Gets the IDL <code>TypeClass</code> of the type. - * <p> * @return the <code>TypeClass</code>. */ TypeClass getTypeClass(); @@ -90,14 +82,12 @@ public interface ITypeDescription { /** * Gets the component <code>ITypeDescription</code> if * this is an array type, otherwise returns <code>null</code>. - * <p> * @return the <code>ITypeDescription</code> */ ITypeDescription getComponentType(); /** * Gets the (UNO) type name. - * * <table> * <caption>Mapping from UNO types to type names</caption> * <thead> @@ -150,14 +140,12 @@ public interface ITypeDescription { * a simple name <var>S</var>, the corresponding type name consists of the * same sequence of module names and simple name, with <code>"."</code> * separating the individual elements.</p> - * * @return the type name. */ String getTypeName(); /** * Gets the (Java) array type name. - * * <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 * 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, * the array type name is defined to be * <code>"[Ljava.lang.Void;"</code>.</p> - * * @return the array type name. */ String getArrayTypeName(); /** * Gets the corresponding java class for the type. - * <p> * @return the corresponding java class. */ Class<?> getZClass(); diff --git a/ridljar/com/sun/star/uno/Type.java b/ridljar/com/sun/star/uno/Type.java index c5f1b5c7bd71..adbcebdd51c3 100644 --- a/ridljar/com/sun/star/uno/Type.java +++ b/ridljar/com/sun/star/uno/Type.java @@ -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) { return obj instanceof Type && _typeClass == ((Type) obj)._typeClass && _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() { 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() { return "Type[" + _typeName + "]"; } diff --git a/ridljar/com/sun/star/uno/Union.java b/ridljar/com/sun/star/uno/Union.java index 6a35d667fb3a..88080954c5e8 100644 --- a/ridljar/com/sun/star/uno/Union.java +++ b/ridljar/com/sun/star/uno/Union.java @@ -26,8 +26,7 @@ package com.sun.star.uno; public class Union { /** * Get the value in the union. - * The representation of the value is an any. - * <p> + * <p>The representation of the value is an any.</p> * @return the any value. */ public final Object getValue() { diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java index 1ebde7d98094..8178b51a2750 100644 --- a/ridljar/com/sun/star/uno/UnoRuntime.java +++ b/ridljar/com/sun/star/uno/UnoRuntime.java @@ -31,7 +31,7 @@ import com.sun.star.lib.util.WeakMap; * * <p>The methods <code>queryInterface</code> and <code>areSame</code> delegate * 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 * <code>public</code> constructor. These artifacts are considered mistakes, |