Sourcecode

Andi_CH

Top Contributor
Hallo.

Ich bin daran meine Entwicklungsumgebung neu aufzusetzen.
(Windows7, Eclipse 3.7, JDK 1.6.0)

Ich stehe nun immer wieder mal vor dem Problem, dass sourcen nicht gefunden werden.
Im Moment gerade die von NativeConstructorAccessorImpl

Vorhanden sind die meisten Sourcen der Projektteile (der Rest währe bei Bedarf natürlich auch verfügbar :) ) und das src.zip aus dem jdk1.6.0_21

Wie finde ich den passenden Sourcecode dafür (wozu gehört der NativeConstructorAccessorImpl überhaupt?)

Natürlich interessiert mich die konkrete Antwort, aber ich möchte ja auch wissen wie ich denn im allgemeinen Fall vorgehen soll um das heraus zu finden. (Wozu was gehört und wo die sourcen sind ...)

Gruss,
Andi
 

Andi_CH

Top Contributor
hm - und mit welchem jar hab ich die wohl importiert ?
(Im Projekt ist leider vieles einfach so, weil es so ist :noe: ) Also die vielen jar's in einem zentralen directory und die langen class-path-listen .... Es macht es nicht einfacher, aber never touch a running system - das **** Projekt ist sensibel genug.)
 

Der Müde Joe

Top Contributor
hier wirste wahrscheinlich auch das finden:
Java Platform, Standard Edition 6u23 Source Snapshot Releases


EDIT:
jup...
Java:
/*
 * %W% %E%
 *
 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package sun.reflect;

import java.lang.reflect.*;

/** Used only for the first few invocations of a Constructor;
    afterward, switches to bytecode-based implementation */

class NativeConstructorAccessorImpl extends ConstructorAccessorImpl {
    private Constructor c;
    private DelegatingConstructorAccessorImpl parent;
    private int numInvocations;

    NativeConstructorAccessorImpl(Constructor c) {
        this.c = c;
    }    

    public Object newInstance(Object[] args)
        throws InstantiationException,
               IllegalArgumentException,
               InvocationTargetException
    {
        if (++numInvocations > ReflectionFactory.inflationThreshold()) {
            ConstructorAccessorImpl acc = (ConstructorAccessorImpl)
                new MethodAccessorGenerator().
                    generateConstructor(c.getDeclaringClass(),
                                        c.getParameterTypes(),
                                        c.getExceptionTypes(),
                                        c.getModifiers());
            parent.setDelegate(acc);
        }
        
        return newInstance0(c, args);
    }

    void setParent(DelegatingConstructorAccessorImpl parent) {
        this.parent = parent;
    }

    private static native Object newInstance0(Constructor c, Object[] args)
        throws InstantiationException,
               IllegalArgumentException,
               InvocationTargetException;
}

EDIT2:
Die natives darfste dir selber da raus suchen ;-)
 
Zuletzt bearbeitet:

Ähnliche Java Themen

Neue Themen


Oben