org.eclipse.jdt.core.manipulation_1.4.0.v20110928-1453

IJavaElement element)
    throws IllegalArgumentException
  {
    if (element == null) {
      throw new IllegalArgumentException("The element for attribute '" + attribute + "' may not be null");
    }
    setString(arguments, attribute, elementToHandle(project, element));
  }
  
  public static void setResourcePath(Map arguments, String attribute, String project, IPath resourcePath)
    throws IllegalArgumentException
  {
    if (resourcePath == null) {
      throw new IllegalArgumentException("The resource for attribute '" + attribute + "' may not be null");
    }
    setString(arguments, attribute, resourcePathToHandle(project, resourcePath));
  }
  
  public static void setInt(Map arguments, String attribute, int value)
    throws IllegalArgumentException
  {
    setString(arguments, attribute, Integer.toString(value));
  }
  
  public static void setBoolean(Map arguments, String attribute, boolean value)
    throws IllegalArgumentException
  {
    setString(arguments, attribute, value ? LOWER_CASE_TRUE : LOWER_CASE_FALSE);
  }
  
  public static void setBooleanArray(Map arguments, String countAttribute, String arrayAttribute, boolean[] value, int offset)
  {
    if (value == null) {
      throw new IllegalArgumentException("The values for arrayAttribute '" + arrayAttribute + "' may not be null");
    }
    if (countAttribute != null) {
      setInt(arguments, countAttribute, value.length);
    }
    for (int i = 0; i < value.length; i++) {
      setBoolean(arguments, getAttributeName(arrayAttribute, i + offset), value[i]);
    }
  }
  
  public static void setString(Map arguments, String attribute, String value)
    throws IllegalArgumentException
  {
    if ((attribute == null) || ("".equals(attribute)) || (attribute.indexOf(' ') != -1)) {
      throw new IllegalArgumentException("Attribute '" + attribute + "' is not valid: '" + value + "'");
    }
    if (value != null) {
      arguments.put(attribute, value);
    } else {
      arguments.remove(attribute);
    }
  }
  
  public static void setStringArray(Map arguments, String countAttribute, String arrayAttribute, String[] value, int offset)
  {
    if (value == null) {
      throw new IllegalArgumentException("The values for arrayAttribute '" + arrayAttribute + "' may not be null");
    }
    if (countAttribute != null) {
      setInt(arguments, countAttribute, value.length);
    }
    for (int i = 0; i < value.length; i++)
    {
      String string = value[i];
      setString(arguments, getAttributeName(arrayAttribute, i + offset), string);
    }
  }
  
  public static void setSelection(Map arguments, String attribute, int offset, int length)
    throws IllegalArgumentException
  {
    String value = Integer.toString(offset) + " " + Integer.toString(length);
    setString(arguments, attribute, value);
  }
  
  public static void setResourcePathArray(Map arguments, String countAttribute, String arrayAttribute, String project, IPath[] resourcePaths, int offset)
    throws IllegalArgumentException
  {
    if (resourcePaths == null) {
      throw new IllegalArgumentException("The resources for arrayAttribute '" + arrayAttribute + "' may not be null");
    }
    if (countAttribute != null) {
      setInt(arguments, countAttribute, resourcePaths.length);
    }
    for (int i = 0; i < resourcePaths.length; i++)
    {
      IPath resourcePath = resourcePaths[i];
      setResourcePath(arguments, getAttributeName(arrayAttribute, offset + i), project, resourcePath);
    }
  }
  
  public static void setJavaElementArray(Map arguments, String countAttribute, String arrayAttributePrefix, String project, IJavaElement[] elements, int offset)
    throws IllegalArgumentException
  {
    if (elements == null) {
      throw new IllegalArgumentException("The elements for arrayAttribute '" + arrayAttributePrefix + "' may not be null");
    }
    if (countAttribute != null) {
      setInt(arguments, countAttribute, elements.length);
    }
    for (int i = 0; i < elements.length; i++)
    {
      IJavaElement element = elements[i];
      setJavaElement(arguments, getAttributeName(arrayAttributePrefix, offset + i), project, element);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.internal.core.refactoring.descriptors.JavaRefactoringDescriptorUtil
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.internal.core.refactoring.descriptors;

import java.util.Map;
import org.eclipse.jdt.core.refactoring.descriptors.ChangeMethodSignatureDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ConvertAnonymousDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ConvertLocalVariableDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ConvertMemberTypeDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.CopyDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.DeleteDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.EncapsulateFieldDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractClassDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractConstantDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractInterfaceDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractLocalDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractMethodDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.ExtractSuperclassDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.GeneralizeTypeDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.InferTypeArgumentsDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.InlineConstantDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.InlineLocalVariableDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.InlineMethodDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.IntroduceFactoryDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.IntroduceIndirectionDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.IntroduceParameterDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.IntroduceParameterObjectDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.MoveDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.MoveMethodDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.MoveStaticMembersDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.PullUpDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.PushDownDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor;
import org.eclipse.jdt.core.refactoring.descriptors.UseSupertypeDescriptor;

public class RefactoringSignatureDescriptorFactory
{
  public static ChangeMethodSignatureDescriptor createChangeMethodSignatureDescriptor()
  {
    return new ChangeMethodSignatureDescriptor();
  }
  
  public static ChangeMethodSignatureDescriptor createChangeMethodSignatureDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ChangeMethodSignatureDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ConvertAnonymousDescriptor createConvertAnonymousDescriptor()
  {
    return new ConvertAnonymousDescriptor();
  }
  
  public static ConvertAnonymousDescriptor createConvertAnonymousDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ConvertAnonymousDescriptor(project, description, comment, arguments, flags);
  }
  
  public static GeneralizeTypeDescriptor createGeneralizeTypeDescriptor()
  {
    return new GeneralizeTypeDescriptor();
  }
  
  public static GeneralizeTypeDescriptor createGeneralizeTypeDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new GeneralizeTypeDescriptor(project, description, comment, arguments, flags);
  }
  
  public static CopyDescriptor createCopyDescriptor()
  {
    return new CopyDescriptor();
  }
  
  public static CopyDescriptor createCopyDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new CopyDescriptor(project, description, comment, arguments, flags);
  }
  
  public static DeleteDescriptor createDeleteDescriptor()
  {
    return new DeleteDescriptor();
  }
  
  public static DeleteDescriptor createDeleteDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new DeleteDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractClassDescriptor createExtractClassDescriptor(String project, String description, String comment, Map arguments, int flags)
    throws IllegalArgumentException
  {
    return new ExtractClassDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractClassDescriptor createExtractClassDescriptor()
  {
    return new ExtractClassDescriptor();
  }
  
  public static ExtractConstantDescriptor createExtractConstantDescriptor()
  {
    return new ExtractConstantDescriptor();
  }
  
  public static ExtractConstantDescriptor createExtractConstantDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ExtractConstantDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractInterfaceDescriptor createExtractInterfaceDescriptor()
  {
    return new ExtractInterfaceDescriptor();
  }
  
  public static ExtractInterfaceDescriptor createExtractInterfaceDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ExtractInterfaceDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractMethodDescriptor createExtractMethodDescriptor()
  {
    return new ExtractMethodDescriptor();
  }
  
  public static ExtractMethodDescriptor createExtractMethodDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ExtractMethodDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractSuperclassDescriptor createExtractSuperclassDescriptor()
  {
    return new ExtractSuperclassDescriptor();
  }
  
  public static ExtractSuperclassDescriptor createExtractSuperclassDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ExtractSuperclassDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ExtractLocalDescriptor createExtractLocalDescriptor()
  {
    return new ExtractLocalDescriptor();
  }
  
  public static ExtractLocalDescriptor createExtractLocalDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ExtractLocalDescriptor(project, description, comment, arguments, flags);
  }
  
  public static InferTypeArgumentsDescriptor createInferTypeArgumentsDescriptor()
  {
    return new InferTypeArgumentsDescriptor();
  }
  
  public static InferTypeArgumentsDescriptor createInferTypeArgumentsDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new InferTypeArgumentsDescriptor(project, description, comment, arguments, flags);
  }
  
  public static InlineConstantDescriptor createInlineConstantDescriptor()
  {
    return new InlineConstantDescriptor();
  }
  
  public static InlineConstantDescriptor createInlineConstantDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new InlineConstantDescriptor(project, description, comment, arguments, flags);
  }
  
  public static InlineMethodDescriptor createInlineMethodDescriptor()
  {
    return new InlineMethodDescriptor();
  }
  
  public static InlineMethodDescriptor createInlineMethodDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new InlineMethodDescriptor(project, description, comment, arguments, flags);
  }
  
  public static InlineLocalVariableDescriptor createInlineLocalVariableDescriptor()
  {
    return new InlineLocalVariableDescriptor();
  }
  
  public static InlineLocalVariableDescriptor createInlineLocalVariableDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new InlineLocalVariableDescriptor(project, description, comment, arguments, flags);
  }
  
  public static IntroduceFactoryDescriptor createIntroduceFactoryDescriptor()
  {
    return new IntroduceFactoryDescriptor();
  }
  
  public static IntroduceFactoryDescriptor createIntroduceFactoryDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new IntroduceFactoryDescriptor(project, description, comment, arguments, flags);
  }
  
  public static IntroduceIndirectionDescriptor createIntroduceIndirectionDescriptor()
  {
    return new IntroduceIndirectionDescriptor();
  }
  
  public static IntroduceIndirectionDescriptor createIntroduceIndirectionDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new IntroduceIndirectionDescriptor(project, description, comment, arguments, flags);
  }
  
  public static IntroduceParameterObjectDescriptor createIntroduceParameterObjectDescriptor()
  {
    return new IntroduceParameterObjectDescriptor();
  }
  
  public static IntroduceParameterObjectDescriptor createIntroduceParameterObjectDescriptor(String project, String description, String comment, Map arguments, int flags)
    throws IllegalArgumentException
  {
    return new IntroduceParameterObjectDescriptor(project, description, comment, arguments, flags);
  }
  
  public static IntroduceParameterDescriptor createIntroduceParameterDescriptor()
  {
    return new IntroduceParameterDescriptor();
  }
  
  public static IntroduceParameterDescriptor createIntroduceParameterDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new IntroduceParameterDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ConvertMemberTypeDescriptor createConvertMemberTypeDescriptor()
  {
    return new ConvertMemberTypeDescriptor();
  }
  
  public static ConvertMemberTypeDescriptor createConvertMemberTypeDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ConvertMemberTypeDescriptor(project, description, comment, arguments, flags);
  }
  
  public static MoveMethodDescriptor createMoveMethodDescriptor()
  {
    return new MoveMethodDescriptor();
  }
  
  public static MoveMethodDescriptor createMoveMethodDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new MoveMethodDescriptor(project, description, comment, arguments, flags);
  }
  
  public static MoveDescriptor createMoveDescriptor()
  {
    return new MoveDescriptor();
  }
  
  public static MoveDescriptor createMoveDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new MoveDescriptor(project, description, comment, arguments, flags);
  }
  
  public static MoveStaticMembersDescriptor createMoveStaticMembersDescriptor()
  {
    return new MoveStaticMembersDescriptor();
  }
  
  public static MoveStaticMembersDescriptor createMoveStaticMembersDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new MoveStaticMembersDescriptor(project, description, comment, arguments, flags);
  }
  
  public static ConvertLocalVariableDescriptor createConvertLocalVariableDescriptor()
  {
    return new ConvertLocalVariableDescriptor();
  }
  
  public static ConvertLocalVariableDescriptor createConvertLocalVariableDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new ConvertLocalVariableDescriptor(project, description, comment, arguments, flags);
  }
  
  public static PullUpDescriptor createPullUpDescriptor()
  {
    return new PullUpDescriptor();
  }
  
  public static PullUpDescriptor createPullUpDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new PullUpDescriptor(project, description, comment, arguments, flags);
  }
  
  public static PushDownDescriptor createPushDownDescriptor()
  {
    return new PushDownDescriptor();
  }
  
  public static PushDownDescriptor createPushDownDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new PushDownDescriptor(project, description, comment, arguments, flags);
  }
  
  public static RenameJavaElementDescriptor createRenameJavaElementDescriptor(String id)
  {
    return new RenameJavaElementDescriptor(id);
  }
  
  public static RenameJavaElementDescriptor createRenameJavaElementDescriptor(String id, String project, String description, String comment, Map arguments, int flags)
  {
    return new RenameJavaElementDescriptor(id, project, description, comment, arguments, flags);
  }
  
  public static EncapsulateFieldDescriptor createEncapsulateFieldDescriptor()
  {
    return new EncapsulateFieldDescriptor();
  }
  
  public static EncapsulateFieldDescriptor createEncapsulateFieldDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new EncapsulateFieldDescriptor(project, description, comment, arguments, flags);
  }
  
  public static UseSupertypeDescriptor createUseSupertypeDescriptor()
  {
    return new UseSupertypeDescriptor();
  }
  
  public static UseSupertypeDescriptor createUseSupertypeDescriptor(String project, String description, String comment, Map arguments, int flags)
  {
    return new UseSupertypeDescriptor(project, description, comment, arguments, flags);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jdt.internal.core.refactoring.descriptors;

import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringContribution;
import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.core.refactoring.RefactoringContribution;
import org.eclipse.ltk.core.refactoring.RefactoringCore;
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;

/**
 * @deprecated
 */
public final class RenameResourceRefactoringContribution
  extends JavaRefactoringContribution
{
  public Refactoring createRefactoring(JavaRefactoringDescriptor javaDescriptor, RefactoringStatus status)
    throws CoreException
  {
    if ((javaDescriptor instanceof org.eclipse.jdt.core.refactoring.descriptors.RenameResourceDescriptor))
    {
      org.eclipse.jdt.core.refactoring.descriptors.RenameResourceDescriptor descriptor = (org.eclipse.jdt.core.refactoring.descriptors.RenameResourceDescriptor)javaDescriptor;
      
      RefactoringContribution newContribution = RefactoringCore.getRefactoringContribution("org.eclipse.ltk.core.refactoring.rename.resource");
      if (newContribution != null)
      {
        RefactoringDescriptor ltkDescriptor = newContribution.createDescriptor();
        if ((ltkDescriptor instanceof org.eclipse.ltk.core.refactoring.resource.RenameResourceDescriptor))
        {
          ((org.eclipse.ltk.core.refactoring.resource.RenameResourceDescriptor)ltkDescriptor).setNewName(descriptor.getNewName());
          ((org.eclipse.ltk.core.refactoring.resource.RenameResourceDescriptor)ltkDescriptor).setResourcePath(descriptor.getResourcePath());
          return ltkDescriptor.createRefactoring(status);
        }
      }
      status.addFatalError(DescriptorMessages.RenameResourceRefactoringContribution_error_cannot_access);
    }
    return null;
  }
  
  public RefactoringDescriptor createDescriptor()
  {
    return new org.eclipse.jdt.core.refactoring.descriptors.RenameResourceDescriptor();
  }
  
  public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map arguments, int flags)
  {
    return new org.eclipse.jdt.core.refactoring.descriptors.RenameResourceDescriptor(project, description, comment, arguments, flags);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jdt.internal.core.refactoring.descriptors.RenameResourceRefactoringContribution
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd