/** * Returns the type of the formal parameter. * * @return The the type of the formal parameter. */ public Type getType() { if (mType == null) { mType = new AST2Type((AST2JSOMTree) getTreeNode().GetChild(1), getTokenRewriteStream()); } return mType; }
/** * Call back method that must be called when the given <code>Type</code> * will become the next <i>traverse candidate</i>. * * @param pType The <code>Type</code> object that will become the next <i> * traverse candidate</i>. */ public void performAction( Type pType) { // Nothing to do. }
/** * Call back method that must be called as soon as the given <code>Type * </code> object has been traversed. * * @param pType The <code>Type</code> object that has just been traversed. */ public void actionPerformed( Type pType) { // Nothing to do. }
/** * Returns the type stated by the generic type argument. * <p> * For the generic type variant <code>Variant.NOT_WILDCARDED</code> the * result of the method is the generic type itself but for the variants * <code>Variant.WILDCARDED_EXTENDS_BOUND</code> and <code> * Variant.WILDCARDED_SUPER_BOUND</code> the returned type corresponds to * the bound type (i.e. the type following the <code>:</code> or * <code>super</code> keyword). * * @return The type stated by the generic type argument or <code>null * </code> if <code>this</code> represents a <code> * Variant.WILDCARDED_NOT_BOUND</code> generic type argument. */ public com.habelitz.jsobjectizer.jsom.api.Type getType() { if (mVariant == Variant.WILDCARDED_NOT_BOUND) { return null; } if (mType == null) { AST2JSOMTree tree = (AST2JSOMTree)getTreeNode(); if (mVariant != Variant.NOT_WILDCARDED) { // Must be an ':' or 'super' bound wildcard. tree = (AST2JSOMTree)tree.GetChild(0).GetChild(0); } mType = new AST2Type(tree, getTokenRewriteStream()); } return mType; }