Search in sources :

Example 11 with JavaMethod

use of org.eclipse.persistence.jaxb.javamodel.JavaMethod in project eclipselink by eclipse-ee4j.

the class JavaClassImpl method getDeclaredMethods.

@Override
public Collection<JavaMethod> getDeclaredMethods() {
    ArrayList<JavaMethod> methodCollection = new ArrayList<>();
    Method[] methods = jClass.getDeclaredMethods();
    for (Method method : methods) {
        methodCollection.add(getJavaMethod(method));
    }
    return methodCollection;
}
Also used : ArrayList(java.util.ArrayList) JavaMethod(org.eclipse.persistence.jaxb.javamodel.JavaMethod) Method(java.lang.reflect.Method) JavaMethod(org.eclipse.persistence.jaxb.javamodel.JavaMethod)

Example 12 with JavaMethod

use of org.eclipse.persistence.jaxb.javamodel.JavaMethod in project eclipselink by eclipse-ee4j.

the class JavaClassImpl method getMethods.

@Override
public Collection<JavaMethod> getMethods() {
    ArrayList<JavaMethod> methodCollection = new ArrayList<>();
    Method[] methods = PrivilegedAccessHelper.getMethods(jClass);
    for (Method method : methods) {
        methodCollection.add(getJavaMethod(method));
    }
    return methodCollection;
}
Also used : ArrayList(java.util.ArrayList) JavaMethod(org.eclipse.persistence.jaxb.javamodel.JavaMethod) Method(java.lang.reflect.Method) JavaMethod(org.eclipse.persistence.jaxb.javamodel.JavaMethod)

Aggregations

JavaMethod (org.eclipse.persistence.jaxb.javamodel.JavaMethod)12 JavaClass (org.eclipse.persistence.jaxb.javamodel.JavaClass)9 ArrayList (java.util.ArrayList)3 JavaField (org.eclipse.persistence.jaxb.javamodel.JavaField)3 XmlElementDecl (jakarta.xml.bind.annotation.XmlElementDecl)2 Method (java.lang.reflect.Method)2 Collection (java.util.Collection)2 Iterator (java.util.Iterator)2 ClassDescriptor (org.eclipse.persistence.descriptors.ClassDescriptor)2 JAXBException (org.eclipse.persistence.exceptions.JAXBException)2 InstanceVariableAttributeAccessor (org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor)2 MethodAttributeAccessor (org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor)2 VirtualAttributeAccessor (org.eclipse.persistence.internal.descriptors.VirtualAttributeAccessor)2 DatabaseField (org.eclipse.persistence.internal.helper.DatabaseField)2 CustomAccessorAttributeAccessor (org.eclipse.persistence.internal.jaxb.CustomAccessorAttributeAccessor)2 JAXBSetMethodAttributeAccessor (org.eclipse.persistence.internal.jaxb.JAXBSetMethodAttributeAccessor)2 JAXBArrayAttributeAccessor (org.eclipse.persistence.internal.jaxb.many.JAXBArrayAttributeAccessor)2 MapValueAttributeAccessor (org.eclipse.persistence.internal.jaxb.many.MapValueAttributeAccessor)2 Field (org.eclipse.persistence.internal.oxm.mappings.Field)2 UnmarshalRecord (org.eclipse.persistence.internal.oxm.record.UnmarshalRecord)2