java.lang.Object
org.glassfish.rmic.iiop.CompoundType.Method
- All Implemented Interfaces:
Cloneable,ContextElement
- Enclosing class:
- CompoundType
A CompoundType.Method object encapsulates IIOP-specific information
about a particular method in the interface represented by the outer
instance.
-
Constructor Summary
ConstructorsConstructorDescriptionMethod(CompoundType enclosing, MemberDefinition memberDef, boolean quiet, ContextStack stack) Create a new Method object corresponding to the given method definition. -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()Cloning is supported by returning a shallow copy of this object.voiddestroy()Release all resources.booleanEquality check based on method signature.String[]Return the names of the argument types of this method.Type[]Return the argument types of this method.intReturn the attribute kind.Return the attribute name.intFor kinds ATTRIBUTE_GET_RW or ATTRIBUTE_IS_RW, return the index of the matching ATTRIBUTE_SET method, and vice-versa.Return the identifier for the class or interface which declares this method.Return context element name.Return the compound type which contains this method.Return an array of the exception classes declared to be thrown by this remote method.getFilteredStubExceptions(ValueType[] list) Return an array containing only those exceptions which need to be handled explicitly by the stub.IDL_Naming Return the IDL name of this method.Same as getExceptions(), except when method is in an ImplementationType and the exceptions list is narrower.Return the MemberDefinition from which this method was created.getName()Return the name of this method.Get the return type of this method.getType()Return the type of this method.getUniqueCatchList(ValueType[] list) Return an array containing only those exceptions which need to be caught.Return the visibility (e.g.inthashCode()booleanIs this method an attribute?booleanReturn true if this is a constructor.booleanIs this method inherited?booleanReturn true if this is NOT a constructor&&is not an attribute.booleanbooleanbooleanisPublic()Methods to check various attributes.booleanIs this method a read-write attribute?booleanisStatic()mergeWith(CompoundType.Method other) Return a new Method object that is a legal combination of this method object and another one.voidsetAttributeKind(int kind) Set attribute kind.voidsetAttributeName(String name) Set attribute name.voidsetAttributePairIndex(int index) Set pair index.voidSet the declaredBy Identifier.voidsetIDLName(String idlName) Set the idl name.voidsetImplExceptions(ValueType[] exceptions) Set the implExceptions array.protected voidConvert all invalid types to valid ones.toString()Return the string representation of this method.
-
Constructor Details
-
Method
public Method(CompoundType enclosing, MemberDefinition memberDef, boolean quiet, ContextStack stack) throws Exception Create a new Method object corresponding to the given method definition.- Throws:
Exception
-
-
Method Details
-
isInherited
public boolean isInherited()Is this method inherited? -
isAttribute
public boolean isAttribute()Is this method an attribute? Return true if getAttributeKind != ATTRIBUTE_NONE. -
isReadWriteAttribute
public boolean isReadWriteAttribute()Is this method a read-write attribute? -
getAttributeKind
public int getAttributeKind()Return the attribute kind. -
getAttributeName
Return the attribute name. Will be null if attribute kind == ATTRIBUTE_NONE. -
getAttributePairIndex
public int getAttributePairIndex()For kinds ATTRIBUTE_GET_RW or ATTRIBUTE_IS_RW, return the index of the matching ATTRIBUTE_SET method, and vice-versa. For all other cases, return -1. -
getElementName
Return context element name.- Specified by:
getElementNamein interfaceContextElement
-
equals
Equality check based on method signature. -
hashCode
public int hashCode() -
mergeWith
Return a new Method object that is a legal combination of this method object and another one. This requires determining the exceptions declared by the combined method, which must be only those exceptions that may thrown by both of the old methods. -
getEnclosing
Return the compound type which contains this method. -
getDeclaredBy
Return the identifier for the class or interface which declares this method. -
getVisibility
Return the visibility (e.g. "public final") of this member. -
isPublic
public boolean isPublic()Methods to check various attributes. -
isProtected
public boolean isProtected() -
isPrivate
public boolean isPrivate() -
isStatic
public boolean isStatic() -
getName
Return the name of this method. -
getIDLName
IDL_Naming Return the IDL name of this method. -
getType
Return the type of this method. -
isConstructor
public boolean isConstructor()Return true if this is a constructor. -
isNormalMethod
public boolean isNormalMethod()Return true if this is NOT a constructor&&is not an attribute. -
getReturnType
Get the return type of this method. May be null. -
getArguments
Return the argument types of this method. -
getArgumentNames
Return the names of the argument types of this method. -
getMemberDefinition
Return the MemberDefinition from which this method was created. -
getExceptions
Return an array of the exception classes declared to be thrown by this remote method. For methods with the same name and type signature inherited from multiple remote interfaces, the array will contain the set of exceptions declared in all of the interfaces' methods that can be legally thrown in each of them. -
getImplExceptions
Same as getExceptions(), except when method is in an ImplementationType and the exceptions list is narrower. -
getUniqueCatchList
Return an array containing only those exceptions which need to be caught. Removes java.rmi.RemoteException, java.lang.RuntimeException, java.lang.Error, and their subclasses, then removes any exceptions which are more derived than another in the list. Returns null if no exceptions need to be caught. -
getFilteredStubExceptions
Return an array containing only those exceptions which need to be handled explicitly by the stub. Removes java.lang.RuntimeException, java.lang.Error, and their subclasses, since these are all passed back as CORBA system exceptions. Also removes subclasses of java.rmi.RemoteException but not java.rmi.RemoteException itself, since this may need to be thrown by the stub. -
toString
Return the string representation of this method. -
setAttributeKind
public void setAttributeKind(int kind) Set attribute kind. May only be called during initialization. -
setAttributePairIndex
public void setAttributePairIndex(int index) Set pair index. May only be called during initialization. -
setAttributeName
Set attribute name. May only be called during initialization. -
setIDLName
Set the idl name. May only be called during initialization. -
setImplExceptions
Set the implExceptions array. May only be called during initialization. -
setDeclaredBy
Set the declaredBy Identifier. May only be called during initialization. -
swapInvalidTypes
protected void swapInvalidTypes()Convert all invalid types to valid ones. -
destroy
public void destroy()Release all resources. -
clone
Cloning is supported by returning a shallow copy of this object.
-