ter.API.Search
Class BasicsSearch

java.lang.Object
  |
  +--ter.API.Search.BasicsSearch
All Implemented Interfaces:
SearchServices

public class BasicsSearch
extends java.lang.Object
implements SearchServices

Title: BasicsSearch

Description: This class allows to make a simple search based on an AdvancedAnalyser. You've got some filter to make your search more precise.

Copyright: Copyright (c) 2003

Company: UNICE

Version:
0.1
Author:
Zerbib Gabriel, Charbit Lucas, Galbois Xavier Gahide Jérôme

Constructor Summary
BasicsSearch()
          make a new basic Search object.
 
Method Summary
 java.util.ArrayList getMethod(ClassifierAnalyser analyser, int attr, int is_static, int is_final, int type)
          Search the method that match exactely the name and the mod specified.
 java.util.ArrayList getMethod(ClassifierAnalyser analyser, java.lang.String name)
          Search all the method of the analyser that exactely matches with the pattern.
 java.util.ArrayList getMethod(ClassifierAnalyser analyser, java.lang.String name, int attr, int is_static, int is_final, int type)
          Search the method that match exactely the name and the mod specified.
 java.util.ArrayList getVariable(ClassifierAnalyser analyser, int is_static, int is_final)
          Search all the variable of the analyser that matches with the pattern and the condition specified by is_static and is_final.
 java.util.ArrayList getVariable(ClassifierAnalyser analyser, java.lang.String name)
          Search all the variable of the analyser that matches with the pattern name.
 java.util.ArrayList getVariable(ClassifierAnalyser analyser, java.lang.String name, int is_static, int is_final)
          Search all the variable of the analyser that matches with the pattern and the condition specified by is_static and is_final.Note that we can't specifie the [public private or protected condition}].
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicsSearch

public BasicsSearch()
make a new basic Search object.

Method Detail

getMethod

public java.util.ArrayList getMethod(ClassifierAnalyser analyser,
                                     java.lang.String name)
Search all the method of the analyser that exactely matches with the pattern.

Specified by:
getMethod in interface SearchServices
Parameters:
analyser - the analyser to search into
name - the name of the method search
Returns:
the ArrayList of the method that match for this Analyser

getMethod

public java.util.ArrayList getMethod(ClassifierAnalyser analyser,
                                     java.lang.String name,
                                     int attr,
                                     int is_static,
                                     int is_final,
                                     int type)
Search the method that match exactely the name and the mod specified. the attr public = 1 private = 2 protected = 3 don't mind = 4 is_static and final yes = 1 no = 2 don't mind = 3 the type abstract = 1 interface = 2 don't mind = 3

Specified by:
getMethod in interface SearchServices
Parameters:
analyser - the analyser to search into
name - the name of the method search
attr - the type of attribute for the method [private, public, protected]
is_static - set the search for a static method or not
is_final - set the search for a final method or not
type - set if the method is abstract or not.
Returns:
the ArrayList of the methods that match for this Analyser

getMethod

public java.util.ArrayList getMethod(ClassifierAnalyser analyser,
                                     int attr,
                                     int is_static,
                                     int is_final,
                                     int type)
Search the method that match exactely the name and the mod specified. the attr public = 1 private = 2 protected = 3 don't mind = 4 is_static and final yes = 1 no = 2 don't mind = 3 the type abstract = 1 interface = 2 don't mind = 3

Specified by:
getMethod in interface SearchServices
Parameters:
analyser - the analyser to search into
attr - the type of attribute for the method [private, public, protected]
is_static - set the search for a static method or not
is_final - set the search for a final method or not
type - set if the method is abstract or not.
Returns:
the ArrayList of the method that match for this Analyser

getVariable

public java.util.ArrayList getVariable(ClassifierAnalyser analyser,
                                       java.lang.String name)
Search all the variable of the analyser that matches with the pattern name.

Specified by:
getVariable in interface SearchServices
Parameters:
analyser - the analyser to search into
name - the name of the variable search
Returns:
the ArrayList of the variable that match for this Analyser

getVariable

public java.util.ArrayList getVariable(ClassifierAnalyser analyser,
                                       java.lang.String name,
                                       int is_static,
                                       int is_final)
Search all the variable of the analyser that matches with the pattern and the condition specified by is_static and is_final.Note that we can't specifie the [public private or protected condition}]. That's normal cause all the value that we are able to get are public.

Specified by:
getVariable in interface SearchServices
Parameters:
analyser - the analyser to search into
name - the name of the variable search
is_static - set the search for a static method or not
is_final - set the search for a final method or not
Returns:
the ArrayList of the variable that match for this Analyser

getVariable

public java.util.ArrayList getVariable(ClassifierAnalyser analyser,
                                       int is_static,
                                       int is_final)
Search all the variable of the analyser that matches with the pattern and the condition specified by is_static and is_final. Note that we can't specifie the [public private or protected condition}]. That's normal cause all the value that we are able to get are public.

Specified by:
getVariable in interface SearchServices
Parameters:
analyser - the analyser to search into
is_static - set the search for a static method or not
is_final - set the search for a final method or not